Hi All,
I am trying to run the following, iteratively:
proc sql noprint;
select name
into :vlist2 separated by ' '
from varnames1 where type = 1 and iter =0;
quit;
In iteration i,the input file is varnamesi and the output is the macro variable &vlist(i+1), i=1,2,...,10.
However, the following code does not work:
%macro stepwise;
some statements here.....
...............
proc sql noprint;
select name
into %str(:vlist)%eval(&i.+1) separated by %str(' ')
from varnames&i. where type = 1 and iter=0;
quit;
%mend;
How can I fix this? Is the first %str() function needed at all? Thanks a lot!!