From: Dan Abner on
Hello,

I want to do something like the following. Is there a way around the error
in macro compilation when an unclosed %DO exists with a macro?

%MACRO M1;
%DO I = 1 %TO &N;
DATA D2;
SET D1;
WHERE CLASS = &I;
RUN;
%MEND;

%MACRO ALL;
%M1 %M2 %END;
%M1 %M3 %END;
%MEND;

where %M2 %M3 are previously defined (however, code omitted here).

In other words, is there a way to close a %DO loop outside of the original
nested macro that the loop began?