How to you want the information formatted? You could put them into those same three macro variables as delimited values. select memname , nvar , nobs into :m1 separated by ' ' , :v1 separated by ' ' , :o1 separated by ' ' Or you could generated multiple variables. select memname , nvar , nobs into :m1 - :m999999 , :v1 - :v999999 , :o1 - : o999999 ... %let n=&sqlobs; There is one difficulty with doing this as a macro since by default to new macro variables will be local to the macro and hence not available when the macro ends. You could force them into the GLOBAL symbol table. In which case it might be easier to do using CALL SYMPUTX. data _null_; if eof then call symputx('n',_N_-1,'G'); set sashelp.vtable end=eof; where libname = %upcase("&lib") ; call symputx(cats('m',_n_),memname ,'G') ; call symputx(cats('v',_n_),nvar ,'G') ; call symputx(cats('o',_n_),nobs ,'G') ; run;
... View more