You can either choose a SAS macro language approach or a use a SAS DATA step, in order to generate the SAS execution code each day inline for your purpose.
A DATA step approach would involve using the INTNX function to step through each date, building SAS code with PUT statements, out to a "temp" sequential file allocation, and then use %INCLUDE to run your "generated" SAS code.
An example:
FILENAME TEMPSAS TEMP;
DATA _NULL_;
FILE TEMPSAS;
MSTARTDT = INTNX('MONTH',TODAY(),0);
PUT 'DATA tab' MSTARTDT YYMMN6. ';';
PUT 'SET' @;
DO MYDATE=MSTARTDT TO TODAY()-1;
PUT ' tab' MYDATE YYMMDDN8. @;
END;
PUT '; ' / 'RUN;';
RUN;
%INCLUDE TEMPSAS;
Some similar macro language logic would also apply, except there is no need to send the SAS code to an external file -- it would be compiled by SAS and then executed.
Hope that helps.
Scott Barry
SBBWorks, Inc.