Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To include a list of macro variables as a column in a SAS dataset, you can use the %let statement to create the macro variables, then use the data step to create a dataset and use the macro variable values as values for the column. Here is an example:

%let var1 = 10; %let var2 = 20; %let var3 = 30;

data mydataset; input macrovar $; datalines; &var1 &var2 &var3 ; run;

This will create a dataset named "mydataset" with one column named "macrovar" and three rows containing the values of the macro variables "var1", "var2", and "var3".