Error calling macro through autocall library

Reply
Contributor
Posts: 33

Error calling macro through autocall library

I have created a macro macro_dev , saved it in file with same name  macro_dev. I have saved the file in location \programs\dev (Linux format).

Now Iam using autocall library function to call this macro:

%let macrodir =\programs\dev\;

options mautosource sasautos = ("&macrodir." sasautos);

%macro_dev

But macro is not called it gives error:

WARNING: Apparent invocation of macro TEST not resolved.

ERROR 180-322: Statement is not valid or it is used out of proper order.

Please guide me how to call a macro using auto call library.

Vishal

Respected Advisor
Posts: 3,156

Re: Error calling macro through autocall library

Posted in reply to vishal_prof_gmail_com

I am not sure what is really going on with your problem, so I can only offer more questions instead of answers:

1. "\programs\dev" does not seem to be linux path, is it typo of "/programs/dev"?

2. Why error message involving macro "TEST" instead of "MACRO_DEV"? is TEST a nested macro to MACRO_DEV?

Happy Holidays!

Haikuo

Respected Advisor
Posts: 4,173

Re: Error calling macro through autocall library

Posted in reply to vishal_prof_gmail_com

In a UNIX environment make sure your .sas file name "macro_dev.sas" is all in lower case (the code inside, even the macro name, can be mixed case).

...and as hai.kuo points out the log you've posted is about a macro "test"  -  so it would be "test.sas" with a macro definition in this file of "%macro test; ....."

Ask a Question
Discussion stats
  • 2 replies
  • 328 views
  • 0 likes
  • 3 in conversation