Despite the code you showed, it seems as if &DAYS has not been defined. So I conclude you didn't run the code you showed.
So, place this command at the start of your code
options mprint symbolgen mlogic;
and run it again.
Then copy the log (the entire log, not just the error messages) as text and paste it into the window that appears when you click on the {i} icon. DO NOT SKIP THIS STEP. This helps keep the formatting of the log readable. Please help us out, and help us help you, by following these instructions.
... View more