DATA temp;
set org;
if substr(terr,2,1)='9' then delete;
run;
the above code will drop if terr having 2nd letter in 9,
How to make sure to not drop terr having (lets say) DAL flag as Y
thanks
Please go back to your original message and provide a meaningful title that (briefly) describes the problem you have. Since almost all messages here could be said to want "help with below code", that doesn't make for a good title.
I agree with @Anne_A , I don't truly understand what you are looking for here. Can you explain further and/or give a few examples of what the code should do?
Not sure I understand your question. Could what you're looking for be
if (substr(terr,2,1)='9' AND DALFLAG ne 'Y') then delete;
?
Please go back to your original message and provide a meaningful title that (briefly) describes the problem you have. Since almost all messages here could be said to want "help with below code", that doesn't make for a good title.
I agree with @Anne_A , I don't truly understand what you are looking for here. Can you explain further and/or give a few examples of what the code should do?
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.