Hi,
I am trying to compile daily datasets into monthly. Below is my Macro to compile. I manage to execute the program and get the desired output. However, my question is, if my daily dataset is missing or incomplete for that certain month, my program will stop executing because of the missing daily dataset. How to ignore the missing, and just compile anything that I have for that month. Thanks.
%MACRO COMBINE(MONTH);
%LOCAL LAST_MONTH DATE ;
%LET LAST_MONTH=%SYSFUNC(INTNX(MONTH,%SYSFUNC(TODAY()),-1,B));
DATA SAVE.ACCOUNT_&REPTMON;
SET
%DO DATE=&LAST_MONTH %TO %SYSFUNC(INTNX(MONTH,&LAST_MONTH,0,E));
SAVE.ACCOUNT_%SYSFUNC(PUTN(&DATE,DDMMYYN8))
%END;
;
RUN;
%MEND;
%COMBINE;
... View more