We can make macro variables via the SAS SQL Procedure, using the syntax
select var into :mvar
But I wonder if there's same way in data step.
I have a dataset.
A B
=== ===
a1 b1
a2 b2
a3 b3
I can make a macro variable called MA
with the below statement.
proc sql noprint;
select "'"||A||"'" into :MA separated by ","
from dataset;
quit;
How to do it in Data-step?
quote
function, instead of all that bothersome concatenation, by the way, in either sql or data step. – Joe