What Are 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 is composed 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 may contain instructions for the presentation of column headers, or for the presentation of the data inside the cells . Style elements may 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 the SAS Output Delivery System: User's Guide .

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.

What Style Definitions Are Shipped with SAS Software?

Base SAS software is shipped with many style definitions. To see a list of these styles, you can 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 Results

    2. In the Results window, select

      View 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.

  • TEMPLATE Procedure:

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

     proc template;     list  style  s;  run; 
  • SQL Procedure:

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

     proc sql;  select * from styles.  style-name  ; 

    The style-name is the name of any style from the template store (for example, styles.default or styles.beige ).

For more information on how ODS destinations use styles and how you can customize styles, see the section on the DEFINE STYLE statement in the SAS Output Delivery System: User's Guide .

How Do I Use 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 the TEMPLATE procedure in the SAS Output Delivery System: User's Guide .

  • 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 headers, 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 .




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