I wrote a proc SQl normally first without any macro variables and it works, now I would like to convert it to macro and it doesnt work, can you see where the problem is ?
%macro macrova(LIB=, DATA=);
proc sql noprint;
/*creating an in memory variable with all char variables from the dataset*/
select name into :names separated by ' '
from dictionary.columns where libname="&lib" and memname="&data" and type='char';
/*to make sure we have the same order of the variables an in-memory variable ORDER is created*/
SELECT NAME INTO: ORDER SEPARATED BY ' '
from sashelp.vcolumn where LIBNAME= "&lib" and memname="&datA" ;
quit;
%MEND;
OPTIONS MLOGIC SYMBOLGEN;
%macrova(LIB=SASHELP,DATA=CLASS)
%PUT &NAMES;
%PUT ℴ
LOG:
55 %PUT &NAMES;
WARNING: Apparent symbolic reference NAMES not resolved.
&NAMES
56 %PUT ℴ
WARNING: Apparent symbolic reference ORDER not resolved.
&ORDER
dictionary.columns
in one query andsashelp.vcolumn
in the second... – Joe