I have a macro loop that isn't processing in SAS, but error log simply spits back the code to me with no explanations. Program is run from the top so no chance of overwriting or missing data; interestingly enough, the same code worked earlier. Restarting SAS doesn't work either.
The %MACRO/%MEND will only DEFINE the macro program and put it into the WORK.SASMACR catalog. You must still INVOKE the macro program.
What errors do you see in the log (if any) when you INVOKE the macro program? How do you know that the macro loop isn't "processing"? Have you turned on the debugging options before you INVOKE the macro program:
options mprint symbolgen mlogic;
Like Cynthia said, you didn't show a statement where you are calling your macro (i.e., a statement like:
The only other thing I can immediately think of is that your data may not be the same as when you have run the code in the past. Specifically, I was surprised to see a variable called month_date, but used in a function that requires a datetime variable.
Your code appeared to run correctly on my computer.