05-12-2015 08:01 AM
Hey does anyone know how to resolve &Key to &animal (or animal) and not platypus and not key?
12 %let animal = platypus;
13 %let key = &animal.;
15 %put %str(&key.);
16 %put %nrstr(&key.);
05-12-2015 08:13 AM
Not sure what you mean.
If you want &KEY to resolve to animal then set it to animal.
%let key=animal ;
If you want include macro trigger in the value then quote the trigger. Your attempt with %STR(&animal) is quoting the result of the macro variable expansion.
%let key=%str(&)animal ;
05-12-2015 09:09 AM
Ahhh thank you Xia. This will work for what we need.
Inheriting large complicated programs is not much fun.
To all, thank you for responding.
Need further help from the community? Please ask a new question.