Hello All,
I have a macro variable test123=combination
In the data step I need to resolve this macro variable.
Example:
%let test123=combination;
data mac;
macval=123;
combval=?
run;
I want the value of combval=combination.
something like combval=&&test.(macval) where macval is referred for the suffix
is there a way without intermediate conversion of macval to macro variable?
Thanks
Mushy
The statement would be
combval = symget(cats('test',macval));
To retrieve the value of a macro variable during data step execution, you need to use the SYMGET Function.
The statement would be
combval = symget(cats('test',macval));
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.