%let C=test;
data a;
input x $;
cards;
LI
GI
H&C
;
proc sql noprint;
select x into :test2 separated by "," from a;
quit;
%put Option_1: %superq(test2);
data _null_;
Option_2=symget("test2");
put Option_2=;
run;
The first question that comes to mind is "what for"?
Macro variables are the worst place for keeping data, SAS provides datasets as storage for that.
And if you need reference data for, say, where conditions, it's always better to use a defined key of some kind and not free-form text, which is the worst you can use for such things.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.