Im trying to run couple reports that reading from different datasets. For some reason, it keeps giving me this "WARNING: Apparent symbolic reference DATASETS_JUL_2016 not resolved.", and the macro is not working. Can someone please tell me what is wrong with my code below.
%macro report(datasets);
ODS Tagsets.ExcelXP FILE= "J:\mydrive\&datasets_JUL_2016.xls" style=fancyprinter;
proc report data=&datasets nofs split='*';
column School ID Class student;
define School / display style={just=left foreground=black cellwidth=70};
define ID / display style={just=left foreground=black cellwidth=70};
define Class / display style={just=left foreground=black cellwidth=70};
define Student / display style={just=left foreground=black cellwidth=70};
run;
ODS Tagsets.ExcelXP close;
%mend report;
%report(abc);
%report(efg);
SAS thinks your macro variable is &datasets_JUL_2016. Put a period between datasets and _JUL, like this:
&datasets._JUL_2016
SAS thinks your macro variable is &datasets_JUL_2016. Put a period between datasets and _JUL, like this:
&datasets._JUL_2016
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.