Hello
I want that value in second column will be macro parameter name and value of first column will be the value of the macro parameter.
So:
parameter Mon1 will get value 1901
parameter Mon2 will get value 1904
parameter Mon3 will get value 1907
parameter Mon4 will get value 1908
What is the way to do it?
Data aaa;
input YYMM mon $;
CARDS;
1901 Mon1
1904 Mon2
1907 Mon3
1908 Mon4
;
Run;
Data aaa;
input YYMM mon $;
CARDS;
1901 Mon1
1904 Mon2
1907 Mon3
1908 Mon4
;
Run;
data _null_;
set aaa;
call symput(mon,YYMM);
run;
%put &Mon1 ;
%put &Mon2 ;
%put &Mon3 ;
%put &Mon4 ;
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.