10-29-2013 04:09 PM
I am running one program having 3 inbuilt macros.
I am trying to execute in EG it is running continuously. But no error.
Please help in this regard. Thank you.
10-29-2013 04:29 PM
This is a nearly impossible question to answer. Someone needs to look at the code and the log to see whether there is anything obvious that is causing the issue. It could be as simple as a missing %MEND or a failure to invoke a macro program definition after you compile it. On the other hand, it could be some other issue or generated code that fails. How do you know that the .SAS program is running continuously? When a macro program is compiled, you do NOT see any compile messages in the SAS log, unless you turn on the MCOMPILENOTE option. And, even then, if you successfully compile a SAS Macro program definition, you still need to invoke that definition. So, for example:
%put Hello World!;
when you submit the above program, the only result in the LOG will be:
NOTE: The macro HW completed compilation without errors.
5 instructions 64 bytes.
If you have MCOMPILENOTE turned on, then you will see the note; otherwise, you won't see anything in the SAS Log. But even if the macro compiles successfully, you still won't get any results from the generated code until you INVOKE the macro program:
in which case, after you submit, you should see the following in your LOG:
7 %hw <--- %hw is the way to invoke the macro program previously defined
Hello World! <--- this line in the log was written by the %PUT statement
Depending on whether your macro program definition has keyword parameters or positional parameters, you might have an issue with incorrectly specified parameters. You could have quoting issues.
The best resource for help with SAS programs and macro definitions, is SAS Tech Support. They can look at ALL your code, collect your operating system and EG information and provide you with hints for debugging your problem.
To open a track with Tech Support, send mail to email@example.com or, fill out the form at this link:http://support.sas.com/ctx/supportform/createForm or you can call them at 919-677-8008 to open a track.