Fixing Autocall Library Specifications
When an autocall library specification causes an error, it is because the macro processor
cannot find the member containing the autocall macro definition in the library or
libraries specified in the SASAUTOS system option.
To correct this error, follow these steps.
1. If the unresolved macro call created an invalid SAS statement, submit a single
semicolon to terminate the invalid statement. SAS is then able to correctly recognize
subsequent statements.
2. Look at the value of the SASAUTOS system option by printing the output of the
OPTIONS procedure or by viewing the OPTIONS window in the SAS windowing
environment. (Or, edit your SAS configuration file or SAS autoexec file.) Verify
each fileref or directory name. If you find an error, submit a new OPTIONS
statement or change the SASAUTOS setting in the OPTIONS window.
3. Check the MAUTOSOURCE system option. If SAS could not open at least one
library, it sets the NOMAUTOSOURCE option. If NOMAUTOSOURCE is present,
reset MAUTOSOURCE with a new OPTIONS statement or the OPTIONS window.
4. If the library specifications are correct, check the contents of each directory to verify
that the autocall library member exists and that it contains a macro definition of the
same name. If the member is missing, add it.
5. Set the MRECALL option with a new OPTIONS statement or the OPTIONS
window. By default, the macro processor searches only once for an undefined macro.
Setting this option causes the macro processor to search the autocall libraries for the
specification again.
6. Call the autocall macro, which includes and submits the autocall macro source.
7. Reset the NOMRECALL option.
Note: Some host environments have environment variables or system-level logical
names assigned to the SASAUTOS library. Check your SAS companion
documentation for more information about how the SASAUTOS library
specification is handled in your host environment.
Fixing Autocall Macro Definition Errors
When the autocall facility locates an autocall library member, the macro processor
compiles any macros in that library member. It stores the compiled macros in the catalog
containing stored compiled macros. For the rest of your SAS session, invoking one of
those macros retrieves the compiled macro from the Work library. Under no
circumstances does the autocall facility use an autocall library member when a compiled
macro with the same name already exists. Thus, if you invoke an autocall macro and
discover you made an error when you defined it, you must correct the autocall library
member for future use. Compile the corrected version directly in your program or
session.
To correct an autocall macro definition in a windowing environment, do the following:
1. Use the INCLUDE command to bring the autocall library member into the SAS
Code Editor window. If the macro is stored in a catalog SOURCE entry, use the
COPY command to bring the program into the Code Editor window.
Troubleshooting Your Macros 133