troubleshooting Question

SAS Datastep conditional logic

Avatar of SASnewbie
SASnewbie asked on
Databases
9 Comments1 Solution583 ViewsLast Modified:
Hello,

Below is the logic I have to populate a variable "Curr_Del" by comparing 3 variables (O21, pmt_due, pmt_trans, of the format type mmyys10.).

What I am need to accomplish is this:
- If O21 = pmt_due and O21 <= pmt_trans then Curr_Del = "Current"
- Else Curr_Del = "Delq"

rsubmit;
data o21_curr_del_test;
set o21_pmt_match2;
by client loan_num;
if o21_actual_date ne .;
if o21 eq pmt_due then
do;
     if pmt_trans le o21 then
          curr_del = 'Current';
end;
else curr_del = 'Delq';
run;
endrsubmit;

I had it working once and now have been looking at it so long I need assistance.

thanks,
SASnewbie
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros