BookmarkSubscribeRSS Feed
soujanyak
Fluorite | Level 6

I created macro called main and end macro. and calling same macro, but I am getting below bolded error while I am running through autosys ( this error in autosys log )

%macro main / minoperator;

---------

------

%mend main;

 

2036 /*call the main macro*/
2037 %main;
2038
ERROR: Expected close parenthesis after macro function invocation not found.
WARNING: Missing %MEND statement for macro MAIN.

3 REPLIES 3
ballardw
Super User

Show us the LOG where you compiled the macro definition.

You also want to turn on OPTIONS MPRINT; before diagnosing any problems with macros so the LOG will show details of the generated code.

The error about close parenthesis could be from something in the body of your macro and we have no clue where it might be.

The warning about no %mend for macro MAIN would make be start looking for mismatched quotes as well as parentheses or comments that may mean the %mend wasn't encountered by the macro compiler.

soujanyak
Fluorite | Level 6

Thank you very much, we were able to find the issue and now our job running successfull

mkeintz
PROC Star

@soujanyak wrote:

Thank you very much, we were able to find the issue and now our job running successfull


Please mark your comment above as the topic solution.  It helps the rest of us.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 429 views
  • 0 likes
  • 3 in conversation