Using ODS to Change the Output Destination
Before ODS was introduced in SAS 7, most procedures generated output that was
designed for a traditional line-printer and the output went straight to the listing window
as a simple list report. If you wanted to change the destination of your output, you used
methods such as PROC PRINTTO and the FILENAME statement. Even though these
methods are useful, there are many more options available with ODS for controlling
output. ODS destination statements enable you to specify a variety of formats and
destinations.
The following list describes some of the commonly used ODS statements and other SAS
language elements that are used for routing output.
Table 9.2 Changing the Output Destination
Method to Use Output Result
PRINTTO procedure routes DATA step, log, or procedure output from
the system default destinations to the destination
that you choose. The PRINTTO procedure defines
non-ODS destinations.
FILENAME statement associates a fileref with an external file or output
device and enables you to specify file and device
attributes
FILE command: Windows stores the contents of the LOG or OUTPUT
windows in files that you specify, when the
command is issued from within the windowing
environment.
ODS LISTING Statement opens, manages, or closes the LISTING destination.
ODS OUTPUT Statement produces a SAS data set from an output object and
manages the selection and exclusion lists for the
OUTPUT destination.
ODS DOCUMENT statement produces and ODS document that enables you to
restructure, navigate, and replay your data in
different ways. It also enables you to specify
multiple destinations without needing to rerun your
analysis or repeat your database query.
ODS HTML Statement opens, manages, or closes the HTML destination,
which produces HTML 4.0 output that contains
embedded style sheets.
ODS MARKUP Statement opens, manages, or closes the MARKUP
destination, which produces SAS output that is
formatted using one of many different markup
languages.
ODS PRINTER Statement opens, manages, or closes the PDF destination,
which produces PDF output, a form of output that is
read by Adobe Acrobat and other applications.
Routing and Customizing SAS Output 159