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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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