Is it possible to create a macro variable this way
%LET i= 40 LT Score LE 60;
So that if I have a data set have
Data have;
INPUT SN Score;
DATALINES;
1 25
2 30
3 80
4 76
5 35
6 50
7 40
8 35
;
And Want,
DATA Want;
SET Have;
Where &I;
RUN;
I made some silly attempts, does not seem to work.
Any help would be highly appreciated!
This error is usually generated when you forget the semicolon on the end of a macro statement.
Close your session and start afresh.
BTW a closer look at your code would lead me to retract my previous "guess".
It should work in a new session.
Richard
Show us the error messages you are getting.
At a guess, it might work with %LET SN = etc etc ;
Richard
This is the error
ERROR: Open code statement recursion detected.
This error is usually generated when you forget the semicolon on the end of a macro statement.
Close your session and start afresh.
BTW a closer look at your code would lead me to retract my previous "guess".
It should work in a new session.
Richard
Thanks Richard!
Silly me!!!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.