BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KevinC_
Fluorite | Level 6
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 !!
1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12
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

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12
Drop the "=" in your %MACRO statement. The "=" specifies that it is a keyword parameter, so you have no positional parameters defined.
KevinC_
Fluorite | Level 6
Thank you so much Doc@Duke! It worked.
maroulator
Obsidian | Level 7

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?


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!

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