At a high level you are going to need to know about
Referencing Macro Variables Indirectly
%do statement
Then you are going to do something like this:
/* create macro to run reports */
/* runs parameter passes the number of runs */
%macro multiRep(runs) ;
/* do loop to loop through the runs */
%do i=1 %to &runs ;
/* msg for the log */
%put Run Report &i ;
/* simple PROC PRINT example */
proc print data=sashelp.class (obs=&i) ;
title "Run Report &i" ;
run ;
%end ;
%mend ;
/* Run macro with 5 runs */
%multiRep(5) ;
Start simple and build up the macro little by little.
... View more