Hello, I am trying to execute the below code but the execution stops unexpectedly. For reference, the min_date is 15Feb1993 and the max_date is 15Dec2013. At the bottom of the macro I have also pasted macro variable resolution from the log. Any help is greatly appreciated. Thanks %macro run_all; proc sql noprint; select max(datepart(current_date)) format=date9., min(datepart(current_date)) format=date9. into :max_date, :min_date from edf; quit; %do %until ("&min_date."d ge "&max_date."d); %let var_2= %sysfunc(inputn(&min_date,date9.),monyy5.); %cohort(&min_date,&var_2); %let min_date=%sysfunc(intnx(month,"&min_date."d,3,same),date9.); %put &min_date.; %end; %mend run_all; SYMBOLGEN: Macro variable MIN_DATE resolves to 15FEB1993 MLOGIC(RUN_ALL): %PUT &min_date. SYMBOLGEN: Macro variable MIN_DATE resolves to 15MAY1993 15MAY1993 SYMBOLGEN: Macro variable MIN_DATE resolves to 15MAY1993 SYMBOLGEN: Macro variable MAX_DATE resolves to 15DEC2013 MLOGIC(RUN_ALL): %DO %UNTIL() condition is TRUE; loop will not iterate again.
... View more