Dear all:
I have written a macro named %xscan. I used the macro within a datastep as follows:
%macro doit;
%do i=1 %to 2;
data work.out_data;
set work.in_data;
sub_str="%xscan(&i)";
output;
%end;
%mend;
%doit
run;
but the loop was run only one time. What' the problem?
Thanks!
I have written a macro named %xscan. I used the macro within a datastep as follows:
%macro doit;
%do i=1 %to 2;
data work.out_data;
set work.in_data;
sub_str="%xscan(&i)";
output;
%end;
%mend;
%doit
run;
but the loop was run only one time. What' the problem?
Thanks!