Hi.
Unless there is the need of repeatabilty, no need of macro coding there.
All it's doing is conditionally setting a START_DT macro variable, based on some other macro variables.
But it's really bad macro coding, and it could be done with much simpler/cleaner data step code:
data _null_;
* set 1;
if symget('ENRLMNTDY') eq '1' then START_DT=1;
* add 14 days;
else if symget('ENRLMNTDY') eq '15' then START_DT=intnx('day',"&START_DT1"d,14);
* add -12*&PERIODS-&ROUNOUT to &RUNDATE and adjust at month's end;
else if upcase(symget('ENRLMNTDY')) eq 'LAST' then START_DT=intnx('month',&RUN_DATE,-12*&PERIODS-&ROUNOUT,'end');
call symput('START_DT',put(START_DT,date9.)); * format and set macro var;
quit;
Daniel Santos @ www.cgd.pt
... View more