I am using a macro to combine 3 different datasets in SAS (MyList1,MyList2,MyList3).
/*Here is the Macro*/
option mprint symbolgen;
%macro MyList;
data MyListFinal;
%let Status = '1';
if Status = &Status then
set
%do i=1 %to 3;
MyList&i
%end;
;
run;
%mend;
%MyList;
The output is creating one observation and the log gives the following message:
NOTE: DATA STEP stopped due to looping.
NOTE: The data set WORK.MYLISTFINAL has 1 observations and 6 variables.
Why am I getting a looping message. In my do statement I am only looping 3 times based on 3 files.
/*Here is the Macro*/
option mprint symbolgen;
%macro MyList;
data MyListFinal;
%let Status = '1';
if Status = &Status then
set
%do i=1 %to 3;
MyList&i
%end;
;
run;
%mend;
%MyList;
The output is creating one observation and the log gives the following message:
NOTE: DATA STEP stopped due to looping.
NOTE: The data set WORK.MYLISTFINAL has 1 observations and 6 variables.
Why am I getting a looping message. In my do statement I am only looping 3 times based on 3 files.