SAS Essentials: Mastering SAS for Data Analytics, 2nd Edition
by Alan C. Elliott, Wayne A. Woodward
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access