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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.