I am trying to get a macro variable to resolve using a counter &CNT. So, the first variable would be cov1, cov2,etc. The statement runs fine, but when I run the %PUT _ALL_; statement nothing is returned. I know it is reading records from the data set because it works if I use a manual name. Am I doing something wrong in the loop or the SYMPUT statement that wouldn't cause an error?
Here is the code:
%MACRO cov07;
%DO CNT = 1 %TO &M %BY 1;
%PUT ;
%PUT ;
%PUT CNT = &CNT;
%PUT ;
%PUT ;
DATA _NULL_;
SET COV07;
CALL SYMPUT("COV&CNT.",COVERAGE&CNT);
RUN;
%END;
%MEND cov07;
Any suggestions?
Here is the code:
%MACRO cov07;
%DO CNT = 1 %TO &M %BY 1;
%PUT ;
%PUT ;
%PUT CNT = &CNT;
%PUT ;
%PUT ;
DATA _NULL_;
SET COV07;
CALL SYMPUT("COV&CNT.",COVERAGE&CNT);
RUN;
%END;
%MEND cov07;
Any suggestions?