Quantcast
Channel: Statistics Help @ Talk Stats Forum - SAS
Viewing all articles
Browse latest Browse all 310

Why the macro within the datasetp loops only one time?

$
0
0
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!

Viewing all articles
Browse latest Browse all 310

Trending Articles