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.
Calling all data scientists and open-source enthusiasts! Want to solve real problems that impact your company or the world? Register to hack by August 31st!
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.