Previous Page | Next Page

The SAS Logging Facility in the SAS Language

Initializing the SAS Logging Facility for SAS Programs


Which Language Elements Need Initializing?

Initializing the logging facility for SAS programs is necessary only if you use the logging facility autocall macros. SAS has no initialization process for the logging facility functions and DATA step objects.


Initializing the Logging Facility Autocall Macros

In order to use autocall macros in SAS, you must set the MAUTOSOURCE system option. When SAS starts, the MAUTOSOURCE option is set, and no further action is required unless this option is turned off.

The logging facility autocall macro %LOG4SAS must be invoked before SAS processes any other logging facility autocall macros. The %LOG4SAS autocall macro defines all other logging facility autocall macros to the SAS session. You can invoke the %LOG4SAS autocall macro in an autoexec file, in an INITSTMT= system option, or at the beginning of your SAS program.

After the MAUTOSOURCE system option is set and the %LOG4SAS autocall macro has been invoked, you can invoke any of the logging facility autocall macros in your SAS program.


The LOGCONFIGLOC= System Option

If your SAS program does not write log events for SAS server loggers, the LOGCONFIGLOC= system option does not need to be set. If the program does write log events using SAS server loggers, you can check that the LOGCONFIGLOC= system option names a logging configuration file. You can check either by issuing the OPTIONS procedure or by viewing the LOGCONFIGLOC= system option in the SAS System Options window.

For more information, see LOGCONFIGLOC= System Option and SAS Server Logger Names.

Previous Page | Next Page | Top of Page