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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.