BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ernie86
Calcite | Level 5

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);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tim_SAS
Barite | Level 11

SAS thinks your macro variable is &datasets_JUL_2016. Put a period between datasets and _JUL, like this:

 

&datasets._JUL_2016

 

View solution in original post

1 REPLY 1
Tim_SAS
Barite | Level 11

SAS thinks your macro variable is &datasets_JUL_2016. Put a period between datasets and _JUL, like this:

 

&datasets._JUL_2016

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2969 views
  • 0 likes
  • 2 in conversation