Академический Документы
Профессиональный Документы
Культура Документы
DAY 8
LISTING
OUTPUT
HTML
RTF
PRINTER
PS
PCL
PDF
MARKUP
DOCUMENT
Continued
Style and table templates:
The two most common types of templates are table templates and style templates
(also called table definitions and style definitions).
A table template specifies the basic structure of your output (which variable will be
in the first column?), while a style template specifies how the output will look (will
the headers be blue or red?).
To view a list of the style templates available on your system, submit the following
PROC TEMPLATE statements, and look in the output window for the list:
PROC TEMPLATE;
LIST STYLES;
RUN;
The ODS TRACE statement: The ODS TRACE statement tells SAS to print
information about output objects in your SAS log. There are two ODS TRACE
statements: one to turn on the trace, and one to turn it off. Here is how to use
these statements in a program:
Continued
Example:
Continued
Output:
Continued
The ODS SELECT statement Once you know the names of the output objects,
you can use an ODS SELECT (or EXCLUDE) statement to choose just the
output objects you want. The general form of an ODS SELECT statement is:
Continued
Example:
PROC MEANS DATA = giant;
BY Color;
TITLE 'Red Tomatoes';
ODS SELECT Means.ByGroup1.Summary;
RUN;
Output:
The ODS OUTPUT statement Here is the general form of a basic ODS OUTPUT
statement:
where output-object is the name, label or path of the piece of output you want
to save, and new-data- set is the name of the SAS data set you want to create.
Continued
Example:
Here is an excerpt from a SAS log showing the trace produced by PROC
TABULATE. TABULATE produces one output object named Table.
DATA giant;
INFILE 'c:\MyRawData\Tomatoes.dat' DSD;
INPUT Name :$15. Color $ Days Weight;
PROC TABULATE DATA = giant;
CLASS Color;
VAR Days Weight;
TABLE Color ALL, (Days Weight) * MEAN;
TITLE 'Standard TABULATE Output';
ODS OUTPUT Table = tabout;
RUN;
PROC PRINT DATA = tabout;
TITLE 'OUTPUT SAS Data Set from TABULATE'; RUN;
Continued
Output:
The ODS OUTPUT statement Here is the general form of a basic ODS OUTPUT
statement:
where output-object is the name, label or path of the piece of output you want
to save, and new-data- set is the name of the SAS data set you want to create.