Hi All,
tried to do IF with many AND condition in dataset, but results was different. Appreciated if anyone can explain further. My code as per below:-
IF ID = 'XXX' AND NPL_Code = 'Y' AND Location_Code = '123456' AND 'O/S> 0'n = 'YES' THEN
Please supply example data that illustrates where your condition did not perform as expected. Use a data step for posting your example data.
Not that avoiding all-uppercase coding and using the code-posting subwindow ("little running man" icon) improves readabilty of your code:
if ID = 'XXX' and NPL_Code = 'Y' and Location_Code = '123456' and 'O/S> 0'n = 'YES' then
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.