06-29-2016 02:00 PM
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
06-29-2016 02:11 PM
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.
But to get the full picture we need the code.
Need further help from the community? Please ask a new question.