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 of
the log event to the message threshold of 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.
For more information, see SAS Logging: Configuration and Programming Reference.
Routing and Customizing SAS Output
Default Output Destination
Definition
The destination in SAS is a designation that the Output Delivery System (ODS) uses to
generate a specific type of output. Or, simply put, it is how and where ODS routes your
output. For example, ODS can route your output to a browser as HTML, to a file, or to
your terminal or display as a simple list report. The destination of your output depends
on the following:
your operating environment
your mode of running SAS
your version of SAS
Default Destinations
In SAS 9.3 and later versions, when running SAS in windowing mode in the Microsoft
Windows and UNIX operating environments, output is sent by default to the HTML
destination (HTML is the default destination). Also, ODS Graphics is turned on by
default in the windowing environment under UNIX and Windows for SAS 9.3 and later
versions.
For running SAS in batch mode, however, LISTING is the default destination for SAS
9.4 and earlier versions, and ODS Graphics is turned off by default. See Table 9.1 on
page 158 for a comparison of output destinations based on SAS version and operating
mode. Your defaults might be different due to your registry or configuration file settings.
The following table shows the default destinations for each method of operation based
on SAS version:
Routing and Customizing SAS Output 157
Table 9.1 Comparison of Default Destinations for Output
SAS Version
Mode of Running
SAS Viewer ODS Destination
SAS 9.3 and later windowing mode SAS Results Viewer or
browser window
HTML
interactive line
mode
terminal display LISTING
noninteractive mode depends on operating environment
batch mode depends on operating environment:
SAS 9.2 windowing mode SAS Output Window LISTING
interactive line
mode
terminal display LISTING
noninteractive mode depends on operating environment
batch mode depends on operating environment
Operating Environment Information
The default destination for SAS output is specific to your operating environment.
Your configuration file and registry settings also affect the where your output is sent.
For specific information about the default output destination, see the SAS
documentation for your operating environment:
UNIX: “The Default Routings for the SAS Log and Procedure Output in UNIX
Environments” in SAS Companion for UNIX Environments
z/OS: “Destinations of SAS Output Files” in SAS Companion for z/OS
Windows: “Managing SAS Output under Windows” in SAS Companion for Windows
For more information about the new defaults and ODS destinations, see the SAS Output
Delivery System: Users Guide.
Changing the Output Destination
Overview
With SAS, there are many ways to control where your log, procedure, and DATA step
output is sent. The method that you use depends on your operating system and the mode
in which you are running SAS. See Table 9.2 on page 159 for a list of commonly used
methods for changing the output destination. You can route your output directly to a PC
or terminal display, to a printer, or to an external file.Output destinations can be specified
using SAS procedures, system options, commands, statements, or global ODS
statements.
158 Chapter 9 SAS Output

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.