Previous Page | Next Page

Statistical Graphics Using ODS

ODS Destination Statements

ODS has a number of statements that control the destination of ODS output. The ODS destination statements that are most commonly used with ODS Graphics are: ODS DOCUMENT, ODS HTML, ODS LATEX, ODS LISTING, ODS PCL, ODS PDF, ODS PS, and ODS RTF. Specifying a statement opens a destination, unless the CLOSE option is specified. Each of the following statements opens an ODS destination:

ods html;
ods rtf;
ods html image_dpi=300;
ods listing style=Statistical;

Each of the following statements closes an ODS destination:

ods html close;
ods rtf close;
ods listing close;

There are two options that are commonly used in ODS destination statements to control aspects of ODS Graphics:


specifies the dots per inch (DPI), which is the image resolution for graphical output. The default varies depending on the destination. For example, the default is 100 for HTML and 200 for RTF.


specifies the style definition. Commonly used styles include DEFAULT, LISTING, STATISTICAL, JOURNAL, JOURNAL2, RTF, and ANALYSIS.

Other options provide you with ways to control the files that are created. For example, the following statement opens the HTML destination:

ods html body='b.html' contents='c.html' frame='a.html';

This statement also writes the body of the output to the file b.html, the table of contents to the file c.html, and an overall frame containing both the contents and the output to the file a.html. Alternatively, you can specify FILE= instead of BODY=.

If you are using a destination for which individual graphs are created (for example, LISTING or HTML), you can use the GPATH= option to specify the directory where your graphics files are saved, as in the following example:

ods html gpath="C:\figures";

See the sections Image File Types, Saving Graphics Image Files, LISTING Destination, HTML Destination, and LATEX Destination for more information about individual image files and options specified in the ODS Destination statements. For complete details about the ODS destination statements, see the SAS Output Delivery System: User's Guide.

Previous Page | Next Page | Top of Page