8CONTROLLING OUTPUT USING ODS

ODS, or Output Delivery System, is a method for controlling the output from SAS procedures. ODS began with version 8 and continues with added enhancements in more recent versions.

8.1 SPECIFYING THE ODS OUTPUT FORMAT AND DESTINATION

The SAS ODS is set up so that you “turn on” or initiate output into a designated output format. Once the output format has been initiated, SAS procedures send information to that output format. You can send output from one or more procedures to the output stream. Following the procedures for which you want the ODS output, you “turn off” or end the output. To initiate output using ODS, use the following statement:

ODS OUTPUT-FORMAT <OPTIONS>;

To end the ODS output, use the CLOSE statement:

ODS OUTPUT-FORMAT CLOSE;

Here are several ODS output formats:

ODS LISTING <FILE='<i>file‐specification</i>'>;
ODS HTML <BODY='<i>HTML‐FILE‐PATHNAME.HTML</i><![CDATA[>';
ODS PDF <FILE='<i>PDF‐FILE‐PATHNAME.PDF</i>'>;
ODS RTF <FILE='<i>RTF‐FILE‐PATHNAME.RTF</i>'>;
ODS PS <FILE='<i>PS‐FILE‐PATHNAME.PS</i>'>;
ODS PLC <FILE='<i>PCL‐FILE‐PATHNAME.PCL</i>'>;

Note that most of the output formats include the option to ...

Get SAS Essentials: Mastering SAS for Data Analytics, 2nd 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.