Hi Commuters ,
data _null_;
call symput("test",'Events and T&E');
run;
%put &test.;
I tried using all macro quoting functions but no use .can help me to get out of this Warning?
log :
1552 data _null_;
1553 call symput("test",'Events and T&E');
1554 run;
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds
WARNING: Apparent symbolic reference E not resolved.
1555
1556 %put &test.;
Events and T&E
You need to quote the string with the & (and also %) in it.
Either add some macro quoting or add some real quotes.
data _null_;
call symputX("test",'Events and T&E');
run;
%put &=test;
%let test=%superq(test);
%put &=test;
data _null_;
call symputX("test",'''Events and T&E''');
run;
%put &=test;
401 data _null_;
402 call symputX("test",'Events and T&E');
403 run;
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
WARNING: Apparent symbolic reference E not resolved.
404 %put &=test;
TEST=Events and T&E
405 %let test=%superq(test);
406 %put &=test;
TEST=Events and T&E
407
408 data _null_;
409 call symputX("test",'''Events and T&E''');
410 run;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
411 %put &=test;
TEST='Events and T&E'
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.