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-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 910 views
  • 0 likes
  • 3 in conversation