Chapter 4
Introduction to ODS Language
Statements
Definition of ODS Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Types of ODS Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
DATA Step Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Global Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Procedure Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Definition of ODS Statements
ODS statements provide greater flexibility in generating, storing, and reproducing SAS
procedure and DATA step output. You can use the ODS statements to control different
features of the Output Delivery System. ODS statements can be used anywhere in your
SAS program. Some ODS statements remain in effect until you explicitly change them.
Others are automatically cleared at particular times. (See the documentation for
individual statements.)
Types of ODS Statements
DATA Step Statements
DATA step statements are either executable or declarative statements that appear in the
DATA step. The ODS statements that are used in the DATA step are executable
statements. Executable statements result in some action during individual iterations of
the DATA step. For more information, see “Executable and Declarative Statements” in
Chapter 1 of SAS Statements: Reference.
Global Statements
Global statements perform the following actions:
• provide information to SAS
• request information or data
• move between different modes of execution
• set values for system options
91
The global ODS statements deliver or store output in a variety of formats. You can use
global statements anywhere in a SAS program. Global statements are not executable;
they take effect as soon as SAS compiles program statements.
Global ODS statements are organized into three categories:
ODS: Output Control
are statements that provide descriptive information about the specified output objects
and indicate whether the style template or table template is supplied by SAS. The
Output Control statements can do the following:
• select or exclude specific output objects for specific destinations
• specify the location where you want to search for or store style templates or table
templates
• verify if you are using a style template or a table template that is supplied by
SAS
• provide descriptive information about each specified output object, such as name,
label, template, path, and label path
ODS: SAS Formatted
are statements that enable you to produce output that is specific to SAS, such as a
SAS data set, SAS output listing, or an ODS document. The statements in the ODS
SAS Formatted category create the SAS output. For more information, see
“Understanding ODS Destinations” on page 33.
ODS: Third-Party Formatted
are statements that enable you to apply styles and markup languages, or produce
output to physical printers using page description languages. For more information,
see “The Third-Party Formatted Destinations” on page 35.
Procedure Statements
For information about the TEMPLATE procedure, see Chapter 10, “TEMPLATE
Procedure: Overview Procedure” in SAS 9.4 Output Delivery System: Procedures Guide.
For information about the DOCUMENT procedure, see Chapter 6, “The DOCUMENT
Procedure Procedure” in SAS 9.4 Output Delivery System: Procedures Guide.
92 Chapter 4 • Introduction to ODS Language Statements
Get SAS 9.4 Output Delivery System, 3rd 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.