The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "&sub";
run;
%mend;
%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?
A. work.ranch
B. work.houses
C. WORK.RANCH
D. WORK.HOUSES
It should be work.ranch but I have different answer in answer sheet.
It's WORK.HOUSES - the final macro call doesn't override the default data set name, it only overrides the default subset value so you have a data set called WORK.HOUSES only containing records where style="TWOSTORY".
It's WORK.HOUSES - the final macro call doesn't override the default data set name, it only overrides the default subset value so you have a data set called WORK.HOUSES only containing records where style="TWOSTORY".
And it is the upper case value because that's the way SAS considers all library, table and variable names since it is case insensitive generally.
Thanks ChrisBrooks and Ballardw. That is very helpful answer.
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.
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.