Sample 24755: Specifying the style template used to create tabular output with DATA step and ODS
Use the FILE PRINT ODS statement to create an output object with the DATA step. Specify a SAS-supplied style
definition on the ODS statement.
Note: ODS provides table definitions that define the structure of
the output from SAS procedures and from the DATA step.
This sample uses the default table template supplied by SAS.
A SAS-supplied style is specified on the ODS statement to
change the look of the output table. (Note ANAYLYSIS style
template is shipped beginning with SAS 9.) You can create a list
of all the SAS-supplied style templates by submitting the
following code:
proc template;
list styles / store=sashelp.tmplmst;
run;
Custom style definitions can be created using PROC TEMPLATE.
Refer to the Output Delivery System User's Guide for
more information.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
/* Close the listing destination to save resources */
ods listing close;
/* Specify the output destination in the ODS statement. If no STYLE= option */
/* is specified, the default is used. */
ods html file='temp.html' style=analysis;
data _null_;
set sashelp.class (obs=5);
file print ods notitles;
put _ods_;
run;
ods html close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
SAS Output
Name
Sex
Age
Height
Weight
Alfred
M
14
69
112.5
Alice
F
13
56.5
84
Barbara
F
13
65.3
98
Carol
F
14
62.8
102.5
Henry
M
14
63.5
102.5
Use the FILE PRINT ODS statement to create an output
object with the DATA step. Specify a SAS-supplied style
definition on the ODS statement.
Type:
Sample
Topic:
Query and Reporting ==> Creating Reports ==> Non Graphical SAS Reference ==> ODS (Output Delivery System) SAS Reference ==> DATA Step