Here are the basic steps for using
ODS in conjunction with the DATA step to produce reports with enhanced
formatting:
Steps to Producing Enhanced ODS Output with the DATA Step
|
|
|
Specify formatting for
your output
|
ODS formatting statements
can specify formats such as listing, HTML, RTF, PS, and PDF.
|
You can also produce
output in multiple formats at the same time by specifying more than
one format.
Note: If you want only
the default output, then you don't need a destination ODS statement.
|
|
The ODS option in the
FILE statement lists the variables and their order in the output.
|
Additional suboptions
give you even more control over the resulting structure.
|
Connect the data to
the template
|
The FILE PRINT ODS statement
creates an output object by binding a data component to a table definition
(template).
|
You can specify other
details by using various ODS suboptions in the FILE PRINT ODS statement.
|
|
The PUT statement writes
variable values to the data component.
|
A simple way to output
all variables is to use PUT _ODS_.
|
First, use ODS statements
to specify how you want ODS to format your output, for example, as
HTML, RTF or PDF. Then, in the DATA step, use the FILE PRINT ODS and
PUT statements, with appropriate ODS-specific suboptions, to produce
your report.
The PUT statement writes
variable values, and the FILE PRINT ODS statement directs the output. You can use ODS to produce the same output in multiple formats,
and to produce output at a later time in a different format, without
rerunning the DATA step.
You control the formatting
that is applied to your reports by using the ODS formatting statements.
They control the opening and closing of ODS destinations, which apply
formatting to the output objects that you create with ODS and the
DATA step.
Here is a list of topics,
with sources for additional information.
Where to Find More Information about How to Use ODS in the
DATA Step
|
|
ODS formatting statements
|
|
|
|
|
|