Dear SAS-experts, I want to make my progamming code more efficient by generating a list of date values from a %macro program. Based on two date value macro's (startdate and enddate) I would like to end up getting a macro-value (&date2) that holds a list of five years on the 1st of January that I can then use in other programs as list values. So far I came up with: %let startdate = 01-01-2017; %let enddate = 01-01-2021; %macro date_test; %let start=%sysfunc(inputn(&startdate,ddmmyy10.)); %let end=%sysfunc(inputn(&enddate,ddmmyy10.)); %let diff=%sysfunc(intck(year,&start,&end)); %do i=0 %to &diff; %global date2; %let date=%sysfunc(intnx(year,&start,&i,b),ddmmyy10.); %let date2=&date; %end; %put &date2; %mend date_test; %date_test In the %do statement it performs well, but I just don't know how to write and retain these values. Can anyone please help me or guide me in the right direction? Thanks in advance! Regards, Ferdinand
... View more