Definitions for SAS Output

SAS output is the result of executing SAS programs. Most SAS procedures and some DATA step applications produce output. A SAS program can produce some or all of the following types of output:
program results
contain the programmatic results from SAS procedures and SAS DATA step applications. These results can be sent to a file or printed as a report. There are a variety of options, formats, statements, and commands available in SAS to customize your output. The Output Delivery System (ODS), enables you to specify output destinations, table definitions, and style definitions, to control where and how your output is stored, the structure of your output, and the style of your output. For more information, see SAS Output Delivery System: User's Guide.
Here are a few examples of the types of output that you can get from running SAS programs:
  • a SAS Data Set
  • an HTML file for Web viewing
  • a simple listing report
  • RTF output suitable for viewing in Microsoft Word
  • SVG output suitable for viewing by mobile devices
  • an ODS Document for specifying multiple destinations at one time
  • output that is formatted for a high-resolution printer such as PostScript and PDF
  • output formatted in various markup languages (in addition to HTML)
SAS log output
SAS log
contains a description of the SAS session and lists the lines of source code that were executed. Depending on the setting of SAS system options, the method of running SAS, and the program statements that you specify, the log can include the following types of information:
  • program statements
  • names of data sets created by the program
  • notes, warnings, or error messages encountered during program execution
  • the number of variables and observations each data set contains
  • processing time required for each step
You can write specific information to the SAS log (such as variable values or text strings) by using the SAS statements that are described in Writing to the Log in All Modes.
The log is also used by some of the SAS procedures that perform utility functions, for example the DATASETS and OPTIONS procedures. See the Base SAS Procedures Guide.
Because the SAS log provides a journal of program processing, it is an essential debugging tool. However, certain system options must be in effect to make the log effective for debugging your SAS programs. Customizing the Log describes several SAS system options that you can use.
SAS console log
created when the regular SAS log is not active, for recording information, warnings and error messages. When the SAS log is active, the SAS console log is used only for fatal system initialization errors or late termination messages.
Note: For more information, see the SAS documentation for your operating environment for specific information about the destination of the SAS console log.
SAS logging facility output
contain log messages that you create using the SAS logging facility. Logging facility messages can be created within SAS programs or they can be created by SAS for logging SAS server messages. Logging facility log messages are based on message categories such as authentication, administration, performance, or customized message categories in SAS programs. In SAS programs, you use logging facility functions, autocall macros, or DATA step component objects to create the logging facility environment.
The logging facility environment consists of loggers, appenders, and log events. A logger defines a message category, references one or more appenders, and specifies the logger's message level threshold. The message level threshold can be one of the following, from lowest to highest: trace, debug, info, warn, error, or fatal. An appender defines the physical location to write log messages and the format of the message. A log event consists of a log message, a message threshold, and a logger. Log events are initiated by SAS servers and SAS programs.
When SAS processes a logging facility log event, it compares the message level in the log event to the message threshold that is defined for the logger that is named in the log event. If the log event message threshold is the same or higher than the logger's message threshold, the message is written to the locations that are specified by the appenders that are referenced in the logger definition. If the log event is not accepted by the logger, the message is discarded.
Appenders are defined for the duration of a macro program or a DATA step. Loggers are defined for the duration of the SAS session.