Chapter 9: TEMPLATE Procedure-Creating a Style Definition


Overview: ODS Style Definitions

Why Use the TEMPLATE Procedure to Create a Style Definition?

The TEMPLATE procedure enables you to customize the look of your SAS output. The TEMPLATE procedure creates and modifies style definitions. The Output Delivery System then uses these style definitions to produce customized formatted output.

By default, ODS output is formatted according to the various style definitions that the procedure or DATA step specify. However, you can also customize the appearance of your output by using the DEFINE STYLE statement in the TEMPLATE procedure.

Terminology

For definitions of terms used in this section, see 'Terminology: TEMPLATE Procedure' on page 266.

What Can You Do with a Style Definition?

Default Style Definition for HTML

By default, ODS uses style definitions to display the procedure or DATA step results. You can modify the appearance of your output by customizing these style definitions. Display 9.1 on page 286 shows the HTML output from PROC PRINT using the default style definition. Display 9.2 on page 287 shows the same HTML output from PROC PRINT with a customized style definition.

click to expand
Display 9.1: HTML Output from PROC PRINT That Uses the Default Style Definition (Viewed with Microsoft Internet Explorer)
click to expand
Display 9.2: HTML Output from PROC PRINT with the Customized Style Definition (Viewed with Microsoft Internet Explorer)
Customized Version of the HTML Style Definition

When you are working with style definitions, you are more likely to modify a SAS style definition than to write a completely new style definition. The next display shows the kinds of changes that you can make to the default style definition for the HTML output. The new style definition affects both the contents file and the body file in the HTML output. In particular, in the contents file, the style definition makes changes to

  • two of the colors in the color list. One of these colors is used as the foreground color for the table of contents, the byline, and column headers. The other is used for the foreground of many parts of the body file, including SAS titles and footnotes.

  • the font size for titles and footnotes

  • the font style for headers

  • the presentation of the data in the table, by changing attributes such as cell

  • spacing, rules, and border width.

In the body file, the new style definition makes changes to

  • the text of the header and the text that identifies the procedure that produced the output

  • the colors for some parts of the text

  • the font size of some parts of the text

  • the spacing in the list of entries in the table of contents.




SAS 9.1 Output Delivery System. Users Guide
SAS 9.1 Output Delivery System Users Guide
ISBN: 1590472187
EAN: 2147483647
Year: 2004
Pages: 99
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net