Previous Page | Next Page

SAS/GRAPH Statements

ODS HTML Statement

Opens or closes the HTML destination.
Requirements: On mainframes, either GPATH= or PATH= is required.



ODS HTML <(<ID=>identifier)> <action>;
ODS HTML <(<ID=>identifier)> <option(s)>;


This section describes the ODS HTML statement as it relates to SAS/GRAPH procedures. For complete information on the ODS HTML statement, see SAS Output Delivery System: User's Guide

The ODS HTML statement opens or closes the HTML destination. If the destination is open, the procedure produces output that is written in Hypertext Markup Language in the form of an HTML file. If no device is specified, SAS/GRAPH, by default, creates a PNG file containing the graph. The HTML file references the PNG file in order to display the graph in a Web page.

If DEVICE=JAVAMETA, graphics output is produced as metagraphics data. The browser passes the metacodes as a parameter to the Metaview applet. The Metaview applet renders the output defined by the metacodes, and displays the interactive graph in a Web page. For more information on DEVICE=JAVAMETA see Developing Web Presentations for the Metaview Applet.

You can also use the DEVICE=JAVA and DEVICE=ACTIVEX options to create interactive graphics presentations for the Web.

SAS/GRAPH adds datatip text to some graphs depending on the device specified. These datatips are generated by default using the values of fields in a SAS data set. You can specify the DESCRIPTION= option on the SAS/GRAPH procedure to change or remove the datatip text. For more information on using data tips see Data Tips for Web Presentations.

The FILE= option identifies the file that contains the HTML version of the procedure output. With SAS/GRAPH, the body file contains references to the graphs. If DEVICE=PNG, the graphs are stored in separate PNG files. When you view the body file in a browser, the graphs are automatically displayed. By default with ODS processing, the PNG files are stored in the current directory. To specify a destination for all the HTML and PNG files, use the PATH= option. To store thePNG files in a different location than the HTML files, use the GPATH= option to specify a location for thePNG files, and the PATH= option to specify the location of the HTML files. In both cases,the destination must be an aggregate storage location.


ODS HTML automatically creates an anchor for every piece of output generated by the SAS procedures. An anchor specifies a particular location within an HTML file. In SAS/GRAPH, an anchor usually defines a link target such as a graph whose location is defined in an IMG element.

In order for the links from the contents, page, or frame file to work, each piece of output in the body files must have a unique anchor to link to. The anchor for the first piece of output in a body file acts as the anchor for that file. These anchors are used by the frame and contents files, if they are created, to identify the targets for the links that ODS HTML automatically generates. For more information about using anchors with the ODS HTML statement see ODS HTML Statement.

Previous Page | Next Page | Top of Page