I wrote some code that is only partially executing (below) and I cannot determine why it is not completely working. I am not receiving an error message. Part of the code is simply not filling in the character data that I've specified. Sample data is attached. A little urgent help please: data &OUTFILE3.; set &OUTFILE3.; LENGTH IMP_JOB2 $30; if IMP_JOB = "z_Blue Collar" and INC_CAT in ("$150k to 199k","$200k to 249k","$250k or More") then IMP_JOB2 = "Doctor"; /* Correctly executed */ else if IMP_JOB = "z_Blue Collar" and INC_CAT in ("$100k to 149k") /* Either not executing or being overwritten somehow */ then IMP_JOB2 = "z_White Collar"; else if IMP_JOB = "z_Blue Collar" and INC_CAT = "None" then IMP_JOB2 = "Unemployed"; /* 0 records, so uncertain if it executed properly */ else IMP_JOB2 = IMP_JOB; run;
... View more