@twildone Sorry about the lag in replying. I do not know why you are getting the error you reported. After adding the extra period in the one place, before the xls (Duh! thanks Reeza) and using a %Put before the ods statement for the purpose of demonstration this is what I got 15 %LET begperiod = %sysfunc(intnx(Year.4, %sysfunc(intnx(Month, 15 ! %sysfunc(today()),-1,E)),0,B)); 16 %LET endperiod = %sysfunc(putN(%sysfunc(intnx(Month, %sysfunc(today()),-1,e)),monyy7.)); 17 18 %Put ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt&begperiod up to end of 18 ! &endperiod..xls"; ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt19449 up to end of DEC2013.xls" [Log from EG 5.1 with server SAS 9.3 - not that I would expect any different from an earlier version] However, the Data _Null_ approach is perhaps the best way to go - easier to follow, easier to debug, no %sysfuncing! Richard in NZ
... View more