Previous Page | Next Page

Understanding and Customizing SAS Output: The Output Delivery System (ODS)

Review of SAS Tools


ODS Statements

ODS EXCLUDE <ODS-destination> output-object(s);

specifies one or more output objects to add to an exclusion list.

ODS HTMLHTML-file-specification(s) <STYLE='style-definition'>;

opens the HTML destination and specifies the HTML file or files to write to. After the destination is open, you can create output that is written in Hyper Text Markup Language (HTML).

You can specify up to four HTML files to write to. The specifications for these files have the following form:

BODY='body-file-name'

identifies the file that contains the HTML output.

Alias: FILE=
CONTENTS='contents-file-name'

identifies the file that contains a table of contents for the HTML output. The contents file has links to the body file.

FRAME='frame-file-name'

identifies the file that integrates the table of contents, the page contents, and the body file. If you open the frame file, you see a table of contents, a table of pages, or both, as well as the body file. If you specify FRAME=, you must also specify CONTENTS= or PAGE= or both.

PAGE='page-file-name'

identifies the file that contains a description of each page of the body file and links to the body file. ODS produces a new page of output whenever a procedure explicitly asks for a new page. The SAS system option PAGESIZE= has no effect on pages in HTML output.

The STYLE= option enables you to choose HTML presentation styles.

ODS LISTING;

opens the Listing destination.

Note:   The Listing destination is open by default.  [cautionend]

ODS LISTING CLOSE;

closes the Listing destination so that no Listing output is created.

ODS OUTPUT output-object(s)=SAS-data-set;

opens the Output destination and converts one or more output objects to a SAS data set.

ODS PRINTER PS file-specification;

opens the Printer destination and specifies the file to write to. The PS (PostScript) option ensures that you create a generic PostScript file. If this option is missing, ODS produces output for your current printer.

ODS RTF file-specification;

opens the RTF destination and specifies the file to write to. After the destination is open, you can create RTF output.

ODS HTML CLOSE;
ODS OUTPUT CLOSE;
ODS PRINTER CLOSE;
ODS RTF CLOSE;

closes the specific destination and enables you to view the output.

ODS _ALL_ CLOSE;

closes all open destinations.

ODS SELECT <ODS-destination> output-object(s);

specifies one or more output objects to add to a selection list.

ODS TRACE ON |OFF;

turns the writing of the trace record on or off. Turning trace on is useful because the results list the output objects that your program creates.


Procedures

PROC MEANS DATA=SAS-data-set <FW=>;

CLASS variable(s);
VAR variable(s);

provides data summarization tools to compute descriptive statistics for variables across all observations and within groups of observations. The DATA= option specifies the input SAS data set, and FW= specifies the field width for statistics.

The CLASS statement specifies the variables whose values define the subgroup combinations for the analysis.

The VAR statement identifies the analysis variables and determines their order in the output.

PROC TEMPLATE;

DEFINE table-definition;
COLUMN header(s);
HEADER column(s);
END;

creates an ODS table definition. The DEFINE statement uses the COLUMN and HEADER statements to create column and table headings.

PROC UNIVARIATE DATA=SAS-data-set;

VAR variable(s);
CLASS variable(s);
BY variable(s);

provides data summarization tools and information about the distribution of numeric variables. The DATA= option specifies the input SAS data set.

The VAR statement identifies the analysis variables and determines their order in the output.

The CLASS statement specifies up to two variables whose values define the classification levels for the analysis.

The BY statement calculates separate statistics for each BY group.

Previous Page | Next Page | Top of Page