Hello,
I am supposed to read the SAS script and then create mapping document. I understood the whole script except following code-
DATA EMPTSLIP; MERGE EMPHIST (IN=A) TSLIP (IN=B); BY ENUM NWTIME; IF A ; run;
In the above code "IF A" is not understood. I searched online and found codes like IF A then OUTPUT but didn't find any code like IF A. What is going on there. Any help would be appreciated.
Thank you
SAS has a shortcut in the language.
IF A;
means the same in your context as
IF A THEN OUTPUT;
Personally, I prefer to use the latter to save confusion, but it's a question of programming style.
Tom
SAS has a shortcut in the language.
IF A;
means the same in your context as
IF A THEN OUTPUT;
Personally, I prefer to use the latter to save confusion, but it's a question of programming style.
Tom
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.