I am creating a macro. My macro Variable have the '%' symbol . I am getting the following Warning. How I can avoid this warning. My macro variable resolving correctly.
%let endlike= %nrstr(%t);
%let xx= %upcase(&endlike);
%put &xx &endlike;
Thank you for your inputs.
The %UPCASE function will remove macro quoting. If you want to keep the % sign quoted, change to %QUPCASE:
1 %let endlike= %nrstr(%t); 2 %let xx= %qupcase(&endlike); 3 4 %put &xx &endlike; %T %t
Thank you. But, what about if any r real macro invocation problems exist in my rest of the code.
How do you distinguish between this example and 'real' macro invocation problems?
I think that's my question too. Here in the log I can see it &XX resolved to '%T ' that's why I thought its not a issue. Correct me if I am wrong.
The %UPCASE function will remove macro quoting. If you want to keep the % sign quoted, change to %QUPCASE:
1 %let endlike= %nrstr(%t); 2 %let xx= %qupcase(&endlike); 3 4 %put &xx &endlike; %T %t
It worked. Thank you.
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.