Reputation: 91
I am writing a SAS program which also uses some macros. However, SAS suddenly stopped running the codes that I submitted. If I select and submit a part of the code, I can see it copied in the log but that's it. No note, error or warning. Neither is the code executed. Doesn't matter if the code is a simple data step without any macro variables. Am I missing anything? What should I check or verify?
Upvotes: 8
Views: 7646
Reputation: 1
I figure out why I also got this issue.
When I collapse all the macro code ( a temporary one just in the same file of my project code), and rerun it.
SAS actually just run the collapsed part, so it is just the first row of the macro.
The code above solves my problem, but I also need to rerun the expanded macro code again to avoid future error.
Upvotes: 0
Reputation: 11
This same problem happened with me during macro coding except it was unmatched parentheses. Original line of problem code was
"...%then %let DLINE=%str(if (P ge 22 and STAFF eq 0 then STAFF=1;);"
Note unmatched "(" character before P variable. Either removing the "(" or adding ")" after "eq 0" solves problem.
Upvotes: 1
Reputation: 7602
This sounds like a classic case of unbalanced quotes within one of your macros. Running the code below should clear it, then you will need to check the code for the error.
*); */; /*’*/ /*”*/; %mend;
Upvotes: 10