An ODS document is a hierarchical file of output objects that is created from a procedure or data query. 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 a
table
graph
equation
note.
An ODS document does not store
SAS logs
SAS system options
procedure options
ODS options
SAS/GRAPH options
SAS/GRAPH external graph titles
GRSEGs (references to GRSEGs, but not GRSEGs themselves , are stored.)
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 your 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 data libraries, see SAS Language Reference: Concepts
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
must be alphanumeric
must begin with an alphabetical character
can contain underscores
can have no more than 32 characters
are preserved with casing (uppercase, lowercase, or mixed case) that is specified in
the mainframe operating environment
can have labels which are no more than 256 characters.
Entries are inserted into an ODS document in the following three ways:
ordered by insertion, which is the default order
ordered by ascending date-time stamp
ordered alphabetically .
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.
You can create an ODS document from almost any Base SAS procedure. The FREQ, PRINT, REPORT, and TABULATE procedures use table definitions that are created by the user , and not defined by a template in ODS. These procedures use custom table definitions, custom data components , and custom formats for their output objects.
Nevertheless, the ODS document and all of its features are supported for the TABULATE procedure. Except for the crosstabs tables in the FREQ procedure, the remaining output objects are supported in an ODS document. ODS documents support some features of PROC PRINT. For example, BY- group processing is not supported, and the REPORT procedure is not supported.
An output object can be one of the following:
table
note
equation.
Output objects have associated information and attributes. Some or all of these attributes pertain to output objects.
after-note | is the note assigned to the output object by the procedure that produced the object. This note is displayed every time the output object is displayed. After-notes display after the output object. |
before-note | is the note assigned to the output object by the procedure that produced the object. This note is displayed every time the output object is displayed. Before-notes display before the output object. |
footnote | is created by the FOOTNOTE statement and is displayed when the output object is created. |
page break | causes a page break prior to displaying the output object and any associated titles and notes. |
subtitle | is the title that is assigned to the output object by the procedure that produced the output object. This title is displayed every time a new page of output is started. |
title | is created by the TITLE statement and is displayed when the output object is created. |
Here is the order in which the attributes of an output object are displayed:
page break
titles
subtitles
before-notes
output object
after-notes
footnotes
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 today's 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.