SAS Institute. The Power to Know

SAS(R) 9.2 Output Delivery System: User's Guide

Previous Page | Next Page

Output Delivery System: Basic Concepts

Understanding Style Definitions, Style Elements, and Style Attributes

To customize the output at the level of your entire output stream in a SAS session, you specify a style definition. A style definition describes how to generate the presentation aspects (color, font face, font size, and so on) of the entire SAS output. A style definition determines the overall look of the documents that use it.

Each style definition consists of style elements. A style element is a collection of style attributes that apply to a particular part of the output. For example, a style element might contain instructions for the presentation of column headings, or for the presentation of the data inside the cells. Style elements might 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 example, the BACKGROUND= attribute specifies the color for the background of an HTML table or for a colored table in printed output. The FONT_STYLE= attribute specifies whether to use a Roman or an italic font. For information on style attributes, see the section on style attributes in TEMPLATE Procedure: Creating a Style Definition.

Note:   Because style definitions control the presentation of the data, they have no effect on output objects that go to the LISTING or OUTPUT destination.  [cautionend]


Style Definitions that Are Shipped with SAS Software

Base SAS software is shipped with many style definitions. To see a list of these styles, view them in the SAS Explorer Window, use the TEMPLATE procedure, or use the SQL procedure.

  • SAS Explorer Window:

    To display a list of the available styles using the SAS Explorer Window, follow these steps:

    1. From any window in an interactive SAS session, select View [arrow] Results

    2. In the Results window, select View [arrow] Templates

    3. In the Templates window, select and open Sashelp.tmplmst.

    4. Select and open the Styles folder, which contains a list of available style definitions. If you want to view the underlying SAS code for a style definition, then select the style 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.  [cautionend]

  • TEMPLATE Procedure:

    You can also display a list of the available styles by submitting the following PROC TEMPLATE statements:

    proc template;
       list styles;
    run;
  • SQL Procedure:

    You can also display a list of the available styles by submitting the following PROC SQL statements:

    proc sql;
    select * from dictionary.styles;
    quit;

For more information on how ODS destinations use styles and how you can customize styles, see the section on the DEFINE STYLE Statement.DEFINE STYLE statement


Using Style Definitions with Base SAS Procedures

  • Most Base SAS Procedures

    Most Base SAS procedures that support ODS use one or more table definitions to produce output objects. These table definitions include definitions for table elements: columns, headers, and footers. Each table element can specify the use of one or more style elements for various parts of the output. These style elements cannot be specified within the syntax of the procedure, but you can use customized styles for the ODS destinations that you use. For more information about customizing tables and styles, see TEMPLATE Procedure: Creating a Style Definition.

  • The PRINT, REPORT and TABULATE Procedures

    The PRINT, REPORT and TABULATE procedures 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 specific cells, change the font face for column headings, and more. The PRINT, REPORT, and TABULATE procedures provide a way for you to customize the markup language and printed output directly from the procedure statements that create the report. For more information about customizing the styles for these procedures, see the Base SAS Procedures Guide.

Previous Page | Next Page | Top of Page