Previous Page | Next Page

Output Delivery System: Basic Concepts

Customized ODS Output


SAS Output

By default, ODS output is formatted according to instructions that a PROC step or DATA step defines. However, ODS provides ways for you to customize the output. You can customize the output for an entire SAS job, or you can customize the output for a single output object.


Selection and Exclusion Lists

For each ODS destination, ODS maintains either a selection list or an exclusion list of output objects. You can use the default output objects selected or excluded for each destination or you can specify which output object you want to produce by selecting or excluding them from a list.

A selection list is a list of output objects that are sent to an ODS destination. An exclusion list is a list of output objects that are excluded from an ODS destination. ODS also maintains an overall selection or exclusion list of output objects. By checking the destination-specific lists and the overall list, ODS determines what output objects to produce. These lists can be modified by using the ODS SELECT statement and the ODS EXCLUDE statement.

You can view the contents of the exclusion and selection lists by using the ODS SHOW statement. The contents information is written to the SAS log.

EXCLUDE ALL is the default setting for the ODS OUTPUT destination. SELECT ALL is the default setting for all other destinations. To change the default selection and exclusion lists, use the ODS SELECT or ODS EXCLUDE statements or use the exclude and select actions that are available for some of the ODS statements. However, to set the exclusion list for the OUTPUT destination to something other than the default, use the ODS OUTPUT Statement. For a list of ODS Output destinations and explanations of each, see Understanding ODS Destinations.

In order to view output objects that are selected or excluded from your program, use the ODS TRACE statement. The ODS TRACE statement prints the output objects that are selected and excluded and puts the information in a trace record that is output in the SAS log. The trace provides the path, the label, and other information about output objects that are selected and excluded. For complete documentation about viewing and selecting output objects, see the ODS SELECT Statement, the ODS EXCLUDE Statement, and the ODS TRACE Statement.


How ODS Determines the Destinations for an Output Object

As each output object is produced, ODS uses the selection and exclusion lists to determine which destination or destinations the output object will be sent to. Figure Directing an Output Object to a Destination illustrates this process:

Directing an Output Object to a Destination

 Note about figure

[Directing an Output Object to a Destination]

Note:   Although you can maintain a selection list for one destination and an exclusion list for another, it is easier to understand the results if you maintain the same types of lists for all the destinations where you route output.  [cautionend]


Customized Output for an Output Object

For a procedure, the name of the table template that is used for an output object comes from the procedure code. The DATA step uses a default table template unless you specify an alternative with the TEMPLATE= suboption in the ODS option in the FILE statement. For more information, see the section on the TEMPLATE= suboption in FILE Statement for ODS.

To find out which table templates a procedure or the DATA step uses for the output objects, you must look at a trace record. To produce a trace record in your SAS log, submit the following SAS statements:

ods trace on;
your-proc-or-DATA-step
ods trace off;

Remember that not all procedures use table templates. If you produce a trace record for one of these procedures, no template appears in the trace record. Conversely, some procedures use multiple table templates to produce their output. More than one template appears in the trace record produced in the log.

For a detailed explanation of the trace record, see the ODS TRACE Statement.

You can use PROC TEMPLATE to modify an entire table template. When a procedure or DATA step uses a table template, it uses the elements that are defined or referenced in its table template. In general, you cannot directly specify a table element for your procedure or DATA step to use without modifying the template itself.

Note:   Three Base SAS procedures, PROC PRINT, PROC REPORT, and PROC TABULATE, do provide a way for you to access table elements from the procedure step itself. Accessing the table elements enables you to customize your report. For more information about these procedures, see the Base SAS Procedures Guide.  [cautionend]


Customizing Titles and Footnotes

You can use the global TITLE and FOOTNOTE statements to enhance the readability of any report. These statements have associated options that enable you to customize the style of the titles and footnotes when they are used with ODS. Because these options control only the presentation of the titles and footnotes, they have no effect on objects that go to the LISTING or OUTPUT destination. Examples of these style options are: BOLD, COLOR=, and FONT=. For a complete list of style options, detailed information about the style options, and example code, refer to the TITLE statement and the FOOTNOTE statement in the SAS Language Reference: Dictionary.

When used with SAS/GRAPH, you can choose whether to render the titles and footnotes as part of the body of the document or as part of the graphics image. Where the titles and footnotes are rendered determines how you control the font, size, and color of the titles and footnotes text. For details on this ODS and SAS/GRAPH interaction, refer to Controlling Titles and Footnotes with ODS Output in SAS/GRAPH: Reference.

For information on titles and footnotes rendered with and without using the graphics option USEGOPT, refer to ODS USEGOPT Statement.


Securing ODS Generated PDF Files

You can use the ODS PRINTER Statement or the ODS PDF Statement to generate PDF output. When these PDF files are not password protected, any user can use Acrobat to view and edit the PDF files. However, SAS system options can restrict or allow users' ability to access, assemble, copy, or modify the ODS PDF files. Other SAS system options control whether the user can fill in forms and set the print resolution. The following SAS system options are documented in SAS Language Reference: Dictionary.

PDF System Options
Task System Option
Specifies whether text and graphics from PDF documents can be read by screen readers for the visually impaired PDFACCESS | NOPDFACCESS
Controls whether PDF documents can be assembled PDFASSEMBLY | NOPDFASSEMBLY
Controls whether PDF document comments can be modified PDFCOMMENT | NOPDFCOMMENT
Controls whether the contents of a PDF document can be changed PDFCONTENT | NOPDFCONTENT
Controls whether text and graphics from a PDF document can be copied PDFCOPY | NOPDFCOPY
Controls whether PDF forms can be filled in PDFFILLIN | NOPDFFILLIN
Specifies the password to use to open a PDF document and the password used by a PDF document owner PDFPASSWORD
Controls the resolution used to print the PDF document PDFPRINT
Controls the printing permissions for PDF documents PDFSECURITY

Note:   The SAS/SECURE SSL software is included in the SAS installation software only for countries that allow the importation of encryption software.  [cautionend]

Previous Page | Next Page | Top of Page