The first macro pgm does not work in SAS 9.1.3. An alternative is to use the second one, however, I'd rather not repeat the "proc print data=test;run;" section since it's actually very long in my pgm. Perhaps I'm having a brain cramp, but I haven't been able to come up with an alternative. Can someone help? (&runflg comes in from another part of the pgm). Thanks, Bill
%macro report; %*First;
%if &runflg in 1,5 %then %do;
proc print
data=test;
run;
%end;
%mend report;
%report;
%macro report;%*Second;
%if &runflg = 1 %then %do;
proc print data=test;
run;
%end;
%else %if &runflg = 5 %then %do;
proc print data=test;
run;
%end;
%mend report;
%report;
changed %runflg to &runflg
Message was edited by: Bill