DATA Step, Macro, Functions and more

Macro Error: More positional parameters found than defined

Accepted Solution Solved
Reply
Regular Contributor
Posts: 173
Accepted Solution

Macro Error: More positional parameters found than defined

Hello Everyone,

I got this error when I tried to run a macro. It encountered the errors right away and didnt run at all. Am I not passing the correct number of variables to the macro?

Here is the macro parameters:

%macro pre_cleanse(indata = , testing = );
macro body
%mend pre_cleanse;

Here is how I execute the macro:

%pre_cleanse(chk_seed,1);

The ERRORS:

%pre_cleanse(chk_seed,1);
MLOGIC(PRE_CLEANSE): Beginning execution.
ERROR: More positional parameters found than defined.
MLOGIC(PRE_CLEANSE): Parameter INDATA has value
MLOGIC(PRE_CLEANSE): Parameter TESTING has value
MLOGIC(PRE_CLEANSE): Ending execution.


Any input will be greatly appreciated.
Thank you !!

Accepted Solutions
Solution
‎09-22-2016 02:27 PM
Trusted Advisor
Posts: 2,116

Re: Macro Error: More positional parameters found than defined

Drop the "=" in your %MACRO statement. The "=" specifies that it is a keyword parameter, so you have no positional parameters defined.

View solution in original post


All Replies
Solution
‎09-22-2016 02:27 PM
Trusted Advisor
Posts: 2,116

Re: Macro Error: More positional parameters found than defined

Drop the "=" in your %MACRO statement. The "=" specifies that it is a keyword parameter, so you have no positional parameters defined.
Regular Contributor
Posts: 173

Re: Macro Error: More positional parameters found than defined

Thank you so much Doc@Duke! It worked.
Frequent Contributor
Posts: 122

Re: Macro Error: More positional parameters found than defined

This is the macro code that I've been running and I get the same ERROR message. "More positional parameters found than defined." The 'collateral' macro seems to compile correctly and the increment variable also evaluates how it is supposed to. What am I missing?


🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 20304 views
  • 5 likes
  • 3 in conversation