ODS Statements

Destination Statements

Like Base SAS, SAS/GRAPH uses ODS destination statements (see line 1and, line 9 in Figure: Typical SAS Program) to control where the output goes and how it looks. While ODS statements are not required in every SAS/GRAPH program, they are necessary if you want to generate graphs for destinations other than the default HTML destination. Some other destinations include LISTING, RTF, and PDF. For more information about ODS destinations, see Understanding ODS Destinations in SAS Output Delivery System: User's Guide in SAS Output Delivery System: User's Guide
As shown in Typical SAS/GRAPH Program, the ODS destination statement is used at the beginning and end of the program to modify the default destination. The beginning statement modifies the default path and filename of the output file as well as the default style. The end statement sets the HTML style back to its default of HTMLBlue. The ODS destination statement can also be used to open a different destination. If you do choose to use a destination other than the default and need to use the ODS destination statement, you should always open the destination before calling the procedure. Opening a non-default destination results in output being sent both to HTML by default as well as to the additional specified destination. Conserve system resources by using the ODS destination statement at the end of the SAS program to close a destination that was opened in that program.

ODS Statement Options

You can use the STYLE= option see line 11 in Figure: Typical SAS Program on the ODS destination statement to change the style that is applied to your output. For more information about the STYLE= option, see Using ODS Styles, Device Parameters, and Options.