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?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: