Working with Output Defaults in SAS 9.3

Overview

Beginning with SAS 9.3, a new set of defaults has been put in place for SAS in the SAS Windowing environment in the Windows and UNIX operating systems:
  • ODS Graphics is enabled at SAS start-up.
  • The LISTING destination is closed and the HTML destination is open.
  • The default style for the HTML destination is HTMLBlue.

ODS Graphics

Beginning with SAS 9.3, template-based graphics (frequently referred to as ODS Graphics) are created by default. ODS Graphics includes all graphical output where a compiled ODS template of type STATGRAPH is used to produce graphical output. Supplied templates are stored in Sashelp.Tmplmst. For ODS Graphics, you must use the ODS GRAPHICS statement to control the graphical environment. You do not have to specify the ODS GRAPHICS ON statement to enable ODS Graphics in the SAS Windowing environment in the Windows and UNIX operating systems.
Note: The SGSCATTER, SGRENDER, SGPLOT, and SGPANEL procedures always generate graphs, even when ODS Graphics is not enabled.

The Default Destination

Beginning with 9.3, by default, in the Windowing environment with the Windows and UNIX operating systems, the LISTING destination is closed and the HTML destination is open. You do not have to submit an ODS HTML statement to generate HTML output, and you do not have to use the ODS HTML CLOSE statement to be able to view your output. However, to create LISTING output, you must either submit the ODS LISTING statement or enable the LISTING destination by other means (see How to Restore 9.2 Behavior).
The HTML destination does the following:
  • generates HTML 4.0 embedded style sheets
  • writes output files to the Work directory
  • does not require you to specify an ODS HTML CLOSE statement to view your output
These behaviors persist until you explicitly close the ODS HTML destination by specifying the ODS HTML CLOSE statement, and then reopen the HTML destination. After you have closed the HTML statement and issued a new ODS HTML statement, the HTML destination does the following:
  • writes output files to the current directory
  • does require you to specify an ODS HTML CLOSE statement to view your output
These behaviors persist until you close your SAS session and open a new one.
CAUTION:
In SAS 9.3, HTML output in the SAS windowing environment is the default for Microsoft Windows and UNIX, but not for other operating systems and not in batch mode. When you run SAS in batch mode or on other operating systems, the LISTING destination is open and is the default, ODS Graphics is not enabled by default, and the default style for HTML output is Styles.Default. Your actual defaults might be different because of your registry or configuration file settings.

How to Restore 9.2 Behavior

Overview

You can change your output defaults back to 9.2 behavior in one of the following three ways:
  • Use the Results tab in the Preferences window. This changes the behavior until you change it back.
  • Use ODS statements. This change lasts only during your current SAS session.
  • Use the ODSSTYLE, ODSDEST, and ODSGRAPHICS system options.

Using the Preferences Window

In SAS 9.3, the default destination in the SAS windowing environment is HTML, and ODS Graphics is enabled by default. These new defaults have several advantages. Graphs are integrated with tables, and all output is displayed in the same HTML file using a new style. This new style, HTMLBlue, is an all-color style that is designed to integrate tables and modern statistical graphics.
You can view and modify the default settings by selecting Toolsthen selectOptionsthen selectPreferences from the menu at the top of the main SAS window. Then open the Results tab. The settings in your Preferences window persist until you explicitly change them. The following display shows the SAS Results tab with the new default settings specified:
By default, the settings in your Results tab in your Preferences window will look like the following. To create LISTING output only by default, select Create listing and deselect Create HTML. To disable ODS Graphics, deselect “Use ODS Graphics”.
Default Results Tab in the Preferences Window
Default Preferences Window in the Windowing Environment
When you have the following selections set, your default output destination will be LISTING until you explicitly change it using ODS statements, the ODSDEST system option, or the Preferences window. When you have the following selections set, by default, ODS Graphics will always be disabled unless you enable ODS Graphics by specifying the ODS GRAPHICS ON statement, use the ODSGRAPHICS system option, or change the setting in the Preferences window.
Results Tab Set to Pre-9.3 Defaults
Results Tab Set to Pre-9.3 Defaults

Using ODS Statements

To change the default destination from HTML to LISTING and to disable ODS Graphics, you can use the following ODS statements:
ods graphics off;
ods html close;
ods listing;
These statements change the behavior of your current SAS session. When you start a new SAS session, the defaults will return to SAS 9.3 behavior.

Using System Options

There are three new system options for SAS 9.3 that control default output.
ODSSTYLE= System Option
specifies the default style. To change the default style to Styles.Default, specify ODSSTYLE=styles.default. For information about the ODSSTYLE= system option, see ODSSTYLE= System Option.
ODSGRAPHICS= System Option
specifies whether ODS Graphics is enabled by default. To disable ODS Graphics by default, specify ODSGRAPHICS=OFF. For information about the ODSGRAPHICS= system option, see ODSGRAPHICS= System Option.
ODSDEST= System Option
specifies the default output destination in the SAS windowing environment. To change the default destination to LISTING, specify ODSDEST=LISTING. For information about the ODSDEST= system option, see ODSDEST= System Option.