No problem when ran this code. In addition, I don't understand why you used: intnx('year',%unquote(&enddate),1,'b')), there is no 'begin' of year in intnx function. 1 %let enddate="01Dec2013"d; 2 3 %macro regression; 4 data _null_; 5 call symputx('niter',intck('month',%unquote(&enddate), 5 ! intnx('month',today(),0,'b'))); 6 call symputx('new', 6 ! put(intnx('year',%unquote(&enddate),1),year4.)); 7 run; 8 %put &niter &new; 9 10 %do n=1 %to &niter; 11 %let 11 ! month=%sysfunc(putn(%sysfunc(intnx(month,%unquote(&enddate),&n)),date9 11 ! .)); 12 %put &month; 13 %end; 14 %mend; 15 16 17 18 %regression NOTE: DATA statement used (Total process time): real time 0.77 seconds cpu time 0.01 seconds 5 2014 01JAN2014 01FEB2014 01MAR2014 01APR2014 01MAY2014
... View more