%macro use;
proc contents data=check(drop=y) out=_out;run;
proc sql;
select distinct name into: list separated by ' '
from _out;
%put the value of %nrstr(&list):&list;
quit;
data naya;
set check;
array n{*} &list;
array x{*} _numeric_;
%do i= 1 %to dim(n);
n{i}=(x({i}=.);
%end;
run;
%mend use;
options mprint mlogic symbolgen;
%use
/*********************************************/
Hi All,
I'm trying to use list of variables which are created using proc sql INTO: in to array do loop SAS code, but I have encountered following ERRORS:
ERROR: Required operator not found in expression: dim(n)
ERROR: The %TO value of the %DO I loop is invalid.
Any suggestion, helps are highly appreciated.
Thanks!
... View more