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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.