Help using Base SAS procedures

Macro symbolic reference resolution warnings

Reply
New Contributor KDA
New Contributor
Posts: 4

Macro symbolic reference resolution warnings

I'm invoking a macro which involves some macro vars that appear within quoted text strings (i.e., filenames of pdfs & titles within those pdfs.) SAS log gives several 'Apparent symbolic ref... not resolved.' Yet, the referenced filenames & titles appear to have correctly resolved.  Any thoughts on why I'm getting warnings? code e.g.:

ClusPDFtitle="CLUSward&LEV._&regSUB.Range.PDF"-- &LEV and &regSUB are the macros.

I've attached to macro definition (REGpairROA_CLUSTER.sas)  file and the macro call (macroWARNING_invocationEG) in case it helps.

Thank you,

KDA

Attachment
Attachment
Super User
Super User
Posts: 6,499

Re: Macro symbolic reference resolution warnings

You are referencing the variables BEFORE they are defined.

%LET LEV=01;

%REGpairROA_CLUSTER

(inputDATASET=K08.gHGUid_54613_PAIRanvaANO_c041012

,regSUBSET=C4p05sig

,ClustPDFtitle="CLUSTERwardLEV&LEV._&regSUBSET.RANGEofAVGsCLUSTERS.PDF"

...

For example you are trying to use the value of the parameter REGSUBSET in the definition of the parameter CLUSTPDFTITLE.

You can either move that value out into an existing macro variable and use it everywhere it is needed (as you did with the macro variable LEV) or you could try using %NRSTR() macro function to tell SAS not to try to resolve &REGSUBSET during the macro call.

New Contributor KDA
New Contributor
Posts: 4

Re: Macro symbolic reference resolution warnings

Please disregard post. I've resolved the issue for now.

Thanks, KDA

Ask a Question
Discussion stats
  • 2 replies
  • 156 views
  • 0 likes
  • 2 in conversation