PROC SQL macro into an ARRAY

#1
I am trying to create a macro (&varlist) using proc sql ---> then putting the variable into the array item[3]. But I get the error "Too few variables defined for the dimension(s) specified for the array item"

What's wrong here? Any help would be greatly appreciated.

Code:
proc sql noprint;
   select variable
      into :varlist
      from configuration;
	  %put &varlist
quit;


DATA outlook&years;
 ARRAY item[3] &varlist(&init) ;
 

Janus

New Member
#2
When you do %put &varlist you probably only see one item, correct. Without specifying a separater, SAS will only take the last item selected. Try this:

Code:
...
into :varlist separated by ' '
...