data decision3; set decision2a; by ln_no; ***Streamline***; if template_NM IN ('STR1','STR2') then do; if DEN_REASON_CD in ('DI','II','PM','NH','TI','NV','BR','IN','ID','IM','ER') then denial_count = 0.50; if trial_count = 1 then do; trial = 0.50; approval = 0.50; total = 0.50; final = 0.50; denial = 0.50; end; if final_count > 0 then do; final = 0.50; approval = 0.50; total = 0.50; trial = 0; denial = 0.50; end; if denial_count = 1 then do; denial = 0.50; approval = 0.50; total = 0.50; trial = 0.50; final = 0.50; end; end; else do; ***Not Streamline***; if template not IN ('STR1','STR2') then do; if LM_REFERRAL_CD in ('TD3','4BN') then do; if DEN_REASON_CD in ('DI','II','PM','NH','TI','NV','BR','IN','ID','IM','ER') then denial_count = 1; if trial_count = 1 then do; trial = 0.25; approval = 0.25; total = 0.25; final = 0; denial = 0; end; if final_count > 0 then do; final = 0.25; approval = 0.25; total = 0.25; trial = 0; denial = 0; end; if denial_count = 1 then do; denial = 0.25; approval = 0; total = 0.25; trial = 0; final = 0; end; end; else do; if trial_count = 1 then do; trial = 1; approval = 1; total = 1; final = 0; denial = 0; end; if final_count > 0 then do; final = final_count; approval = final; total = final_count; trial = 0; denial = 0; end; if denial_count = 1 then do; denial = 1; approval = 0; total = 1; trial = 0; final = 0; end; end; if approval > 0 then LM_DEN_REASON_CD = ' '; PROC_STRING = strip(put(LM_REFERRAL_CD,$amname.)) || " - " || strip(LM_REFERRAL_CD); drop trial_count final_count denial_count; end; run; proc sort data=decision3; by LM_REFERRAL_CD ln_no; run; By chance do you see anything wrong with the code. I keep getting error below. It appears I have my do; and end; accounted for but it shows the error after run; twice yet in my code I show run; once. 485 486 drop trial_count final_count denial_count;end; 487 488 run; 488 run; _ 117 ERROR 117-185: There was 1 unclosed DO block. It looks like the problem occurs toward the end of the program. The code only shows run; once but shows it twice in the error message
... View more