Types of SAS Output

Overview of Types of SAS Output

For each SAS process, SAS can create three types of output:
  • SAS log file
  • SAS procedure output file
  • SAS console log file.

SAS Log File

The SAS log file contains information about the processing of SAS statements. As each program step executes, notes are written to the SAS log along with any applicable error or warning messages. For more information, see SAS Log File.

SAS Procedure Output File

Whenever a SAS program executes a PROC step that produces printed output, SAS sends the output to the procedure output file. Beginning with Version 7, SAS procedure output is handled by the Output Delivery System (ODS), which enhances your ability to manage procedure output. Procedures that fully support ODS can
  • combine the raw data that they produce with one or more templates to produce one or more objects that contain the formatted results.
  • store a link to each output object in the Results folder in the Results window.
  • (optional) generate HTML files that contain the formatted results and links to those results, as in a table of contents.
  • (optional) generate data sets from procedure output.
  • provide a way to customize procedure output by creating templates that you can use whenever you run your procedure.
For more information about ODS, see SAS Output Delivery System: User's Guide.
For more information about the procedure output file, see SAS Procedure Output File.

SAS Console Log File

If an error, warning, or note must be written to the SAS log and the log is not available, the console log is used instead. The console log file is particularly useful for capturing log entries that are generated during SAS initialization, before the SAS log file is allocated. For more information about this file, see Console Log File.

Destinations of SAS Output Files

The following table shows the default destinations of the SAS output files.
Default Destinations for SAS Output Files
Processing Mode
Log File
Procedure Output File
batch
printer
printer
windowing environment (TSO)
Log window
Output window
interactive line (TSO)
terminal
terminal
noninteractive (TSO)
terminal
terminal
These default destinations are specified in the SAS cataloged procedure, in the SAS CLIST, or in the SASRX exec, which you use to invoke SAS in batch mode and under TSO, respectively. Your system administrator might have changed these default destinations.
If you want to change the destination of these files, use the following table to help you decide which method you should choose.
Changing the Default Destination
Output Destination
Processing Mode
Method to Use
Documentation
a printer
any mode
FILENAME statement and PRINTTO procedure
windowing environment under TSO
PRINT command and the Universal Printing subsystem option display
PRINT command and the FORM subsystem option display
PRTFILE and PRINT commands
an external file
any mode
PRINTTO procedure
batch
LOG= and PRINT= system options
SASLOG DD and SASLIST DD statements
its usual location and to an external file
any mode
ALTLOG= and ALTPRINT= system options
windowing environment under TSO
FILE command
a remote destination
any mode
FILENAME statement and PRINTTO procedure
Beginning with Release 8.2, SAS output can also be routed via electronic mail (e-mail). For information about how SAS implements e-mail delivery, see Sending E-Mail from within SAS Software .