How Does ODS Work?

Components of ODS

ODS creates various types of tabular output by combining raw data with one or more table templates to produce one or more output objects. The basic component of ODS functionality is the output object. The PROC or DATA step that you run provides the data component (raw data) and the name of the table template that contains the formatting instructions. The data component and table template together form the output object. There are two types of output objects created by ODS: tabular output objects and graphical output objects. These objects can be sent to any or all ODS destinations, such as PDF, HTML, RTF, or POWERPOINT. By default, in the SAS windowing environment for Windows and UNIX, SAS uses ODS to produce HTML output. By default, in batch mode, SAS produces LISTING output. By specifying an ODS destination, you control the type of output that SAS creates.
You can use ODS to manipulate one or more output objects in many different ways.
  • You can use the DOCUMENT procedure to select, rearrange, store, or replay output objects.
  • You can use ODS output destinations to create output in many different formats.
  • You can use the ODS TRACE statement to determine what output objects are available. Then, you can use the ODS SELECT or ODS EXCLUDE statement to select or exclude the output object from an output destination.
The following figure shows how SAS produces ODS output.
ODS Processing: What Goes in and What Comes Out
ODS Processing: What Goes In and What Comes Out
* List of Tagsets That SAS Supplies and Supports
CHTML
CSV
CSVALL
CSVBYLINE
DEFAULT
DOCBOOK
EXCELXP
HTML4
HTMLCSS
HTMLPANEL
IMODE
MSOFFICE2K
PHTML
PYX
TAGSETS.RTF
SASREPORT
WML
WMLOLIST
XHTML
* Additional Diagnostic Tagsets That SAS Supports
EVENT_MAP
NAMEDHTML
SHORT_MAP
STYLE_DISPLAY
STYLE_POPUP
TEXT_MAP
TPL_STYLE_LIST
TPL_SYLE_MAP
Note: There are also preproduction tagsets. These tagsets can be found at http://support.sas.com. They are not yet supported by SAS.

Where Does ODS Put My Output?

By default, SAS stores output created by ODS in your Work directory. In the SAS windowing environment for Windows and UNIX, after you have opened and closed the HTML destination, your output goes to your current working directory. You can use the ODS PREFERENCES statement anytime during your SAS session to return to the default behavior. This action is helpful when you are creating multiple graphics and do not want them to accumulate in your current working directory.