This is simple...but I'm stumped. I have:
data ESRA.&month_label._&year_want; set ESRA.CURRENTMONTH; run;
This makes a dataset called MARCH_2019
I would like MARCH 2019 (note the no underscore). I have tried a bunch of different ways but I know the marco references can be a bit strange when spaces are concerned.
Thanks
Don't do that. You can put the space in the label.
data ESRA.&month_label._&year_want (label="&month_label. &year_want");
set ESRA.CURRENTMONTH;
run;
If you really want to then you will need to use a name literal.
options validmemname=extend;
data ESRA."&month_label. &year_want"n (label="&month_label. &year_want");
set ESRA.CURRENTMONTH;
run;
Don't do that. You can put the space in the label.
data ESRA.&month_label._&year_want (label="&month_label. &year_want");
set ESRA.CURRENTMONTH;
run;
If you really want to then you will need to use a name literal.
options validmemname=extend;
data ESRA."&month_label. &year_want"n (label="&month_label. &year_want");
set ESRA.CURRENTMONTH;
run;
thanks all....I had forgotten about the space....I was asked to see if it could be done. Cheers!
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.