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.
It would help if you post your macros
Hi:
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:
options mcompilenote=all;
%macro hw;
%put Hello World!;
%mend hw;
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:
%hw
in which case, after you submit, you should see the following in your LOG:
5
6
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 support@sas.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.
cynthia
Thanks.
mcompilenote is a very useful opiton.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.