TEMPLATE Procedure: Creating Tabular Output |
PROC TEMPLATE features: |
EDIT
statement |
Header attributes:
|
Table attributes:
|
DOUBLE_SPACE= |
|
OVERLINE= |
|
UNDERLINE= | |
|
Other ODS features: |
ODS HTML statement |
ODS SELECT statement |
|
Data set: |
Exprev.
|
Note: This example uses filenames that might not be
valid in all operating environments. To successfully run the example in your
operating environment, you might need to change the file specifications. See
ODS HTML Statements for Running Examples in Different Operating Environments.
This
example customizes the table template for the Moments
output object from PROC UNIVARIATE. The first program uses the table template
that SAS supplies to generate both listing output and HTML output of the Moments
object.
The second program does the following:
-
creates and edits a copy of the default table
template
-
edits a header within the table template
-
sets column attributes to enhance the appearance
of both the HTML and the listing output
|
options nodate pageno=1 pagesize=60 linesize=72; |
|
ods html body="DefaultMoments-Body.htm "; |
|
ods select moments; |
|
proc univariate data=exprev mu0=3.5;
var Quantity;
title "Default Moments Table";
run; |
|
ods html close; |
Listing Output from PROC UNIVARIATE (Default Moments Table)
Default HTML Output
|
ods path sasuser.templat(update) sashelp.tmplmst(read); |
|
proc template;
edit base.univariate.moments; |
|
double_space=on;
underline=on;
overline=on; |
|
edit head; |
|
style=header{color=green fontstyle=italic}; |
|
just=left; |
|
end;
end;
run; |
|
ods html body="Custommoments-Body.htm"; |
|
ods select moments; |
|
proc univariate data=exprev mu0=3.5;
var Quantity;
title "Custom Moments Table";
run; |
|
ods html close; |
Listing Output (Customized Moments Table) from PROC UNIVARIATE
Customized HTML Output (Customized Moments Table) from PROC UNIVARIATE (Viewed with Microsoft Internet Explorer)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.