The DOCUMENT Procedure |
About ODS Documents |
An ODS document is a hierarchical file of output objects that is created from a procedure or data query. The output objects are in unformatted form, and they are stored in a SAS item store. The hierarchy is controlled by the internal logic of the procedure or data query.
In an ODS document, each level of the hierarchical file represents a path which refers to the location of a file, link, or output object. An output object can be one of the following:
An ODS document does not store the following items:
An ODS document is a member of a SAS library. Therefore, you can browse, edit, and replay the output contained in the ODS document to any ODS destination without rerunning the SAS programs that created the initial output. An ODS document persists in the SAS System until the document, or the SAS library containing the document, is deleted. Thus an ODS document that was created in the SASUSER library, or in another permanent SAS library, can persist indefinitely because it is considered a permanent archive of SAS procedure output. However, an ODS document that is created in the WORK library does not persist longer than the SAS session that created it. For information about SAS libraries, see SAS Language Reference: Concepts.
Understanding an ODS Document Path |
Because an ODS document is stored as an item store, this file format enables client applications to define a "hierarchal file system within a file." This is similar to a directory system in a Windows operating environment, or a partitioned data set in a mainframe operating environment. Therefore, an ODS document path means the location of an entry.
Entry names follow these rules:
are preserved with casing (uppercase, lowercase, or mixed case) that is specified in the operating environment
Entries are inserted into an ODS document in the following three ways:
Understanding Sequence Numbers |
Entry names are not required to be unique within an ODS document. However, they are uniquely identifiable because they contain sequence numbers. Every entry in an ODS document, except for the root file location, has a sequence number. A sequence number is a positive integer that is unique with respect to the name of the entry within the same file location level. Entries are assigned sequence numbers according to the sequence in which they are added to a file location. For example, the first entry myname is assigned a sequence number 1, myname#1. The second entry myname is assigned a sequence number 2, myname#2. Sequence numbers are never reassigned, unless all entries with the same name are deleted. In this case, the sequence numbers are reset to an initial number of 1.
ODS Documents and Base SAS Procedures |
You can create an ODS document from almost any Base SAS procedure. The PRINT, REPORT, and TABULATE procedures use table templates that are created by the user, and not defined by a template in ODS. These procedures use custom table templates, custom data components, and custom formats for their output objects. Nevertheless, the ODS document and all of its features are supported for the TABULATE and REPORT procedures. ODS documents do not support some features of PROC PRINT. For example, BY group processing in the PRINT procedure is not supported.
Getting Familiar with Output Objects |
An output object is one of the following:
equation
graph
note
table
Here is the order in which the attributes of an output object are displayed:
Understanding How ODS Documents Interact across Operating Environments |
An ODS document that is created in the current version of SAS is compatible with later versions of SAS. In most cases, an ODS document created in a later version of SAS will still be compatible with an earlier version of SAS.
ODS documents are not portable across operating environments. For example, an ODS document created in a Windows operating environment cannot be used in a mainframe operating environment.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.