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));
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.