BookmarkSubscribeRSS Feed
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

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.

Sreenivasa
3 REPLIES 3
art297
Opal | Level 21

It would help if you post your macros

Cynthia_sas
SAS Super FREQ

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

HongqiuGu
Calcite | Level 5

Thanks.

mcompilenote  is a very useful opiton.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1057 views
  • 1 like
  • 4 in conversation