| The Complete Guide to the SAS Output Delivery System |
By default, ODS output is formatted
according to instructions
that the procedure or DATA step points to. However, ODS provides ways for
you to customize the output. You can customize the output for an entire SAS
job, or you can customize the output for a single output object.
To customize the output at
the level
of the entire SAS job, you specify a style definition.
A style definition describes how to render the presentation aspects (color,
font face, font size, and so forth) of an entire SAS job. A style definition
determines the overall look of the documents that use it.
Each style definition is composed of style
elements. A style element is a collection of style attributes that
apply to a particular part of the output. For instance, a style element may
contain instructions for the presentation of column headers or for the presentation
of the data inside cells. Style elements may also specify default colors and
fonts for output that uses the style definition.
Each style attribute specifies
a value for one aspect of the presentation. For instance, the BACKGROUND attribute
specifies the color for the background an HTML table, and the FONT_STYLE attribute
specifies whether to use a Roman, a slant, or an italic font.
Note:
Because style definitions control the presentation
of the data, they have no affect on output objects that go to the Listing
or Output destination. ![[cautend]](../common/images/cautend.gif)
A table
definition
describes how to render the output for a tabular output object. (Almost all
ODS output is tabular.) A table definition determines the order of column
headers and the order of variables, as well the overall look of the output
object that uses it.
In addition to the parts of the table definition that
order the headers and columns, each table definition contains or references table elements. A table element is a collection of table attributes
that apply to a particular header, footer, or column. Typically, a table attribute specifies something about the data rather than
about its presentation. For instance FORMAT specifies the SAS format to use
in a column. However, some table attributes describe presentation aspects
of the data.
Note:
The parts of table definitions that
control the presentation of the data have no affect on output objects that
go to the Listing or Output destination. However, the parts that control the
structure of the table and the data values do affect Listing output. ![[cautend]](../common/images/cautend.gif)
To specify a style definition for your ODS output, use the STYLE=
option in the ODS HTML statement. (See Appending to HTML Files.) Your site may have its own customized
style definition that is used for all HTML output to give it a consistent
appearance.
The standard style definitions that are currently shipped with the SAS System
include
| default |
D3D |
| beige |
minimal |
| brick |
statdoc |
| brown |
To find an up-to-date list of the style definitions:
-
Select
| View |
![[arrow]](../common/images/arrow.gif) |
Results |
from the
Explorer.
-
In the Results window,
select the Results folder. With your cursor on this folder, use your right
mouse button to open the Templates window.
-
In the Templates window, select and open
Sashelp.tmplmst.
-
Select Styles, and
use your right mouse button to open this folder, which contains a list of
available style definitions. If you want to view the underlying SAS code for
a style definition, select and open it.
Operating Environment Information:
For information
on navigating in the Explorer window without a
mouse, see the section on "Window Controls and General Navigation"
in the SAS documentation for your operating environment.
You can create your own style definitions or modify
existing ones with PROC TEMPLATE.
For a procedure, the name of the table definition that is used
for an output object comes from the procedure code. The DATA step uses a default
table definition unless you specify an alternative with the TEMPLATE= suboption
in the ODS option in the FILE statement (see the discussion of TEMPLATE=).
To find out which table
definitions a procedure or the
DATA step uses for the output objects that it creates, look at a trace record.
To produce a trace record in your SAS log, submit the following SAS statements:
ods trace on;
your-proc-or-DATA-step
ods trace off;
The trace record refers to the table definition as a
template. For a detailed explanation of the trace record, see Contents of the Trace Record.
Note:
Remember that not all
procedures use a table definition.
If you produce a trace record for one of these procedures, no definition appears
in the trace record. ![[cautend]](../common/images/cautend.gif)
You can use PROC TEMPLATE to modify a table definition
as a whole, but, in general, you can't directly specify a table element for
your procedure or DATA step to use without modifying the definition itself.
When a procedure or DATA step uses a table definition, it uses the table elements
that that definition defines or references.
Note:
Two
base procedures, PROC REPORT and PROC TABULATE, do provide a way for you to
access table elements from the procedure step itself. Accessing the table
elements enables you to do such things as specify background colors for certain
cells, change the font face for column headers, and so forth. For more information,
consult "Customizing the Styles Used in HTML Output" in Chapter
2 of SAS Procedures Guide, as well as the documentation for these two procedures in the
same document. ![[cautend]](../common/images/cautend.gif)
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.