Reputation: 9
Can anyone see what I have incorrect on this date macro? I want sysdate - 7 days, I want to go back one week for the date.
"WEEK OVER WEEK COMPARISON SUMMARY" @&sysdate -7 Format=MMDDYYS10.;
1 line "WEEK OVER WEEK COMPARISON SUMMARY" @10JUN22 -7 Format=MMDDYYS10.;
_
22
ERROR 22-322: Expecting an integer constant.
Upvotes: 0
Views: 156
Reputation: 27508
In a macro context date arithmetic can be done with %sysfunc(intnx...
%sysfunc has a parameter for specifying the format of the computed result when it is returned to the macro system as source.
So, your macro implementation might need to be changed to
"WEEK OVER WEEK COMPARISON SUMMARY - %sysfunc(intnx(day,"&sysdate"d,-7), mmddyys10.)";
Upvotes: 1