DATA Step, Macro, Functions and more

WARNING: Apparent invocation of macro xxx not resolved.

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

WARNING: Apparent invocation of macro xxx not resolved.

I'm trying to use a macro (relrisk9) to conduct a binomial log regression, but cannot seem to invoke the macro! 

The folder path I've used is taken straight from SAS, so I don't see how that could be what's wrong, although it appears to be the most common cause of this warning?

 

Screen Shot 2018-07-25 at 11.17.25 am.pngCodeScreen Shot 2018-07-25 at 12.53.11 pm.pngLog


Accepted Solutions
Solution
4 weeks ago
Super User
Super User
Posts: 8,287

Re: WARNING: Apparent invocation of macro xxx not resolved.

Looks like you pointed the SASAUTOS option to an individual file instead of a folder.

You can fix this two ways.

1) Change the SASAUTOS option to point to DIRECTORY where you have placed the relrisk9.sas file.

2)  Don't use autocall. Just use %INCLUDE to include the file with the macro definition.

 

View solution in original post


All Replies
Solution
4 weeks ago
Super User
Super User
Posts: 8,287

Re: WARNING: Apparent invocation of macro xxx not resolved.

Looks like you pointed the SASAUTOS option to an individual file instead of a folder.

You can fix this two ways.

1) Change the SASAUTOS option to point to DIRECTORY where you have placed the relrisk9.sas file.

2)  Don't use autocall. Just use %INCLUDE to include the file with the macro definition.

 

New Contributor
Posts: 4

Re: WARNING: Apparent invocation of macro xxx not resolved.

Hi there,

 

Removing relrisk9.sas from the file path (to run the code below instead) still produces the warning. Is this what you meant or did I misunderstand?

 

proc options option = macro;
run;

options nocenter ps=78 ls=132 replace formdlim='='
mautosource
sasautos=('/usr/local/channing/sasautos',
'/folders/myfolders/macros');

%relrisk9(DATA=NZHS.USEME, DEPEND=obese, INDEPEND=incomeorder);

Super User
Super User
Posts: 8,287

Re: WARNING: Apparent invocation of macro xxx not resolved.

[ Edited ]

Since you already failded to find it once SAS is probably not looking for it again.  You could set the MRECALL option.

Or just restart a new SAS session and try the code again.

 

Also make sure that the filename is all lower case letters.  Autocall is looking for 'relrisk9.sas' and will ignore files in mixed or uppercase. such as 'Relrisk9.sas' or 'RELRISK9.SAS'.

 

New Contributor
Posts: 4

Re: WARNING: Apparent invocation of macro xxx not resolved.

I've tried both restarting the session & the mrecall function, but to no luck.

Screen Shot 2018-07-25 at 1.47.22 pm.png

The file name is relrisk9 so it's definitely not the case where we're falling over.

 

P.s. Thank you so much for your help! I'm sorry to keep replying by saying it's not working, I've been grappling with this for a day to no avail. The particularly frustrating thing is that it was working a few days ago and I have no clue what I've changed!

New Contributor
Posts: 4

Re: WARNING: Apparent invocation of macro xxx not resolved.

I've been able to get %include to work instead!

 

Thank you so much for your time and expertise. Smiley Happy

☑ This topic is solved.

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

Discussion stats
  • 5 replies
  • 103 views
  • 0 likes
  • 2 in conversation