Desktop productivity for business analysts and programmers

Autocall not working under EG

Reply
Contributor
Posts: 24

Autocall not working under EG

I'm defining my autocall library as follows:

filename sharemac '/home/sas/permanent/BI Group Shared Code';
OPTIONS DATE NOCENTER OBS=MAX MAUTOSOURCE sasautos = (sasautos sharemac);

There is a valid macro in the directory to which sharemac points named cutback_by_model_score.sas. It's called by the same program having the statements above (which show no errors in the log, BTW). This worked when I was using traditional (display manager) SAS, but when I run this call in EG I get:

562 ! %cutback_by_model_score(OUT.&INPUT_SAS_DS,&SEG_ID,&TOT_SEG_TARG,&TREAT_TARG);
_
180
MPRINT(CUTBACK_MANAGER): * Macro call to cutback_by_model_score code;
WARNING: Apparent invocation of macro CUTBACK_BY_MODEL_SCORE not resolved.
MPRINT(CUTBACK_MANAGER): %cutback_by_model_score(OUT.maillist,002,12300,.);

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

If I open cutback_by_model_score.sas in EG and run it, the problem vanishes. So it has to be something involved in using autocall under EG. Can anyone help me fix what's wrong?

TIA,
Steve
Super Contributor
Super Contributor
Posts: 3,174

Re: Autocall not working under EG

What OS? Is there any other "working" SAS macro defined in the same directory/folder? If so, compare how the complete files are named. If not Windows, may want to verify the file extension, I believe.

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 24

Re: Autocall not working under EG

Thanks for the suggestions.

The SAS server and the file system are in Linux. The .sas extension is correct on all of the macros in the directory (dozens). There are a few name styles (capitalized, mixed, or lower case, single words vs. multiple separated by underscores, etc.), but they all behave the same way.

If I do an %include with the fully specified file name, they're fine, or if I open the code using EG and submit them first, the macro can be used in the same session. None, however, can be found using the autocall facility.

Steve
Super Contributor
Super Contributor
Posts: 3,174

Re: Autocall not working under EG

Set the max diagnostics you can with:

OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC;

and go from there to diagnose the problem with your macro compilation, possibly.

Scott Barry
SBBWorks, Inc.
Valued Guide
Posts: 2,111

Re: Autocall not working under EG

Where are you putting the autocall code? That is, how are you telling EG where to look. EG does not use autoexec.sas, it has it's own startup file (that changed in EG 4.2).
Contributor
Posts: 24

Re: Autocall not working under EG

It's part of the same job where the macro is invoked. Both examples I gave in my initial post are from the same log.
Super Contributor
Super Contributor
Posts: 3,174

Re: Autocall not working under EG

Suggest you add a PROC OPTIONS to detect and print the current SASAUTOS setting at the end of your SAS program in case it has been changed. Some environment issue is causing your problem, in my experience. Or consider using the following statement instead of PROC OPTIONS:

%put %sysfunc(getoption(sasautos));


Scott Barry
SBBWorks, Inc.
Contributor
Posts: 24

Re: Autocall not working under EG

I verified sasautos was correct, then dug up the fexist function to check the filereff. The problem all along was that the directory was named BI Group SAS Code, not BI Group Shared Code. Once sharemac actually points to the real directory, everything works. I'm pretty embarrassed!

Thanks for the help!

Steve
Ask a Question
Discussion stats
  • 7 replies
  • 201 views
  • 0 likes
  • 3 in conversation