Hi I have data sets as follows : DATA_SET_202202 (Records for month Feb, 2022) DATA_SET_202203 (Records for month Mar, 2022) and so on I want to append all the data sets in a single table such that records from DATA_SET_202202 are first followed by _202203 and so on I am using the below MACRO for this : %MACRO JOIN; %LET DD = '202202'; %DO COUNT = 0 %TO 4 ; /*FOR TEST RUN*/ %LET DD_DATE = INPUT(&DD.,YYMMN6.); DATA _NULL_ ; CALL SYMPUTX('BASEMON&COUNT', PUT(INTNX('MONTH',&DD_DATE.,&COUNT.),YYMMN6.)); RUN; %PUT BASEMON&COUNT:&&BASEMON&COUNT; %IF &COUNT. = 0 %THEN %DO ; DATA TEST; SET DATA_SET_&&BASEMON&COUNT.; RUN; %END; %ELSE %D0; PROC APPEND BASE =TEST DATA=DATA_SET_&&BASEMON&COUNT.; RUN; %END; %END; %MEND; In this i am getting error that my variable basemon&count itself is not getting created. Can anyone please suggest
... View more