Hi,
I am trying to filter some of my data and create a new dataset. using the following syntax:
data YYY; set XXX; if DeathCause_ICD in ("A923", "A9231","A9232","A9239") THEN disease1=1; IF condition_rec_1 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_2 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_3 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_4 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_5 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_6 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_7 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_8 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_9 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_10 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_11 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_12 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_13 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_14 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_15 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_16 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_17 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_18 in ("A923", "A9231","A9232","A9239") then disease1=1; IF condition_rec_19 in ("A923", "A9231","A9232","A9239") then disease1=1; if condition_rec_20 in ("A923", "A9231","A9232","A9239") then disease1=1; else delete; RUN;
While I am not receinving any error in the log, still my syntax not working and giving me 0 observations.
I have used this syntax multiple times and i canot figure out wher it is going wront. any thoughts appreciated.
... View more