BookmarkSubscribeRSS Feed
KDA
Calcite | Level 5 KDA
Calcite | Level 5

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

2 REPLIES 2
Tom
Super User Tom
Super User

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.

KDA
Calcite | Level 5 KDA
Calcite | Level 5

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

Thanks, KDA

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1236 views
  • 0 likes
  • 2 in conversation