Hello community,
I am trying to make a %do %while nested loop here, can you please check if there is an error? because when I run the code it iterates for CHAN A and the 12 month but it closes and didn't do chan B....
Thank you
%let CHAN=A B C D E;
%let MONTH=JAN FEB MAR APR MAY JUN JUL AGO SEP OCT NOV DEC;
%macro TEST ();
%local i j month_1 chan_1;
%let j=1;
%let i=1;
%do %while (%scan(&chan, &j.) ne );
%let chan_1 = %scan(&chan, &j.);
%do %while (%scan(&month, &i.) ne );
%let month_1 = %scan(&month, &i.);
/*SOME STEPS HERE*/
%let i = %eval(&i. + 1);
%end;
%let j = %eval(&j. + 1);
%end;
%mend TEST;
Using SAS EG 7.13