I dont understand when to sprinkle in the "run" command.
Sometimes in EG, %put &s1 yields
&s1
and sometimes in SunOS, the same statement yields correctly as:
1234.5678
But if I remember to magically sprinkle in
run;
%put &s1;
it works. yipee
Q: What is the rule of thumb, and please don't say always insert "run" because I know often times it is unneeded.
thanks
jim
To quote from a paper (http://www2.sas.com/proceedings/sugi22/ADVTUTOR/PAPER44.PDF 😞
When a step boundary (basically a RUN statement or
a new step) is encountered, the previous step is
compiled and executed (if no syntax errors were
found ).
In short, if you have to use a macro variable or anything else that is dependent upon compilation and execution (from a data step), use a run statement.
Personally, I like to use them all of the time.
To quote from a paper (http://www2.sas.com/proceedings/sugi22/ADVTUTOR/PAPER44.PDF 😞
When a step boundary (basically a RUN statement or
a new step) is encountered, the previous step is
compiled and executed (if no syntax errors were
found ).
In short, if you have to use a macro variable or anything else that is dependent upon compilation and execution (from a data step), use a run statement.
Personally, I like to use them all of the time.
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.