options mprint mlogic symbolgen; %macro month_date_ftch; %local month_num basemonth month; proc sql stimer ; %let basemonth=%sysfunc(inputn(&Month_6.,yymmn6.)); %do month_num =0 %to 5; %let month= %sysfunc(intnx(month,&basemonth,&month_num-1),yymmn6.); %put &month.; create table perm.mytab_&month. as select a.sbscr_nbr,a.yyyymm,a.qoe_global_score from pd.QOE_SUMRY_&month. a ,perm.el_a_exl_sub_&yyyymm. b where b.sbscr_nbr=a.sbscr_nbr; %end; quit; %MEND month_date_ftch; %month_date_ftch;
SYMBOLGEN: Macro variable MONTH_6 resolves to 77798 MLOGIC(MONTH_DATE_FTCH): %DO loop beginning; index variable MONTH_NUM; start value is 0; stop value is 5; by value is 1. MLOGIC(MONTH_DATE_FTCH): %LET (variable name is MONTH) SYMBOLGEN: Macro variable BASEMONTH resolves to 2125558 SYMBOLGEN: Macro variable MONTH_NUM resolves to 0 MLOGIC(MONTH_DATE_FTCH): %PUT &month. SYMBOLGEN: Macro variable MONTH resolves to 777907 777907 SYMBOLGEN: Macro variable MONTH resolves to 777907 SYMBOLGEN: Macro variable MONTH resolves to 777907 SYMBOLGEN: Macro variable YYYYMM resolves to 202001 MPRINT(MONTH_DATE_FTCH): create table perm.mytab_777907 as select a.sbscr_nbr,a.yyyymm,a.qoe_global_score from pd.QOE_SBSCR_SUMMARY_777907 a ,perm.el_a_exl_sub_202001 b where b.sbscr_nbr=a.sbscr_nbr; ERROR: File PD.QOE_SUMRY_777907.DATA does not exist.
why the highlightd part isnot converting as yymmn6. format is it coz &month_6. is a char field being a macro variable
... View more