Hi. I have this reference to &ZIP5 that isn't resolving. It's inside of my Macro named Loopy, does this keep it from resolving? Or maybe something to do with the statements being in quotes?
Any help would be appreciated.
MPRINT(LOOPY): * Create unique index (if not exist), to meet the criteria that only one record (imb) per ;
MPRINT(LOOPY): * rule is kept and counted in the data ;
MPRINT(LOOPY): data _null_;
MPRINT(LOOPY): set sashelp.vmember (where=(Libname='WORK' and memname='FINALDATA&ZIP5'));
MPRINT(LOOPY): if upcase(index)='NO' then call execute('proc datasets; modify finaldata&ZIP5; index create imb_code /unique;
run; quit;');
MPRINT(LOOPY): run;
NOTE: There were 0 observations read from the data set SASHELP.VMEMBER.
WHERE (Libname='WORK') and (memname='FINALDATA&ZIP5');
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
Hi,
No way to know for sure until we get to see the full code. But a common oversight is to determine the scope of a variable. If it is not defined as global inside a macro the variable reference may not get resolved.
%GLOBAL zip5;
But to get the full picture we need the code.
Regards,
- Jan
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.