I would like to create a macro variable that takes into account all the observations of a variable in one specific table.
For example, in the table "LIST_VAR", I have a variable "NAME" that contents those observations:
I want to create a macro variable that browse the table "LIST_VAR" and returns me the observations of the variable Name, separeted by a ' ' so I can finally get: !macrovar=var1 var2 var3 var4.
This on SAS SQL would look like:
proc sql noprint;
select distinct Name
into :macrovar separated by ' '