Macro Vector??

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

wiibtr
Posts: 6
Joined: Thu Nov 20, 2014 4:38 pm

Macro Vector??

Postby wiibtr » Thu Nov 20, 2014 4:47 pm

Hi,

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:

Name
var1
var2
var3
var4

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 ' '
from LIST_VAR;
quit;

Thank you.

Who is online

Users browsing this forum: No registered users and 2 guests

cron