I wanted to remove closing brackets from below macro variable.
%LET x = )AL);
Final result should be as ...
%put RESULT = &x.;
RESULT = AL
Hi abhinayingole,
You can do it as follows:
%LET X = )AL);
%put &=X;
data _null_;
call symputx('RESULT', compress("&X",')'));
run;
%put &=RESULT;
In the LOG you will get:
X=)AL) RESULT=AL
Hope this helps.
yes, it worked . Thanks
@abhinayingole Please don't post the same question twice.
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.