Dictionary
ODS HTML Statement
Opens, manages, or closes the HTML destination, which produces HTML 4.0 output that can contain
embedded style sheets.
Valid in: Anywhere
Category: ODS: Third-Party Formatted
Default: The default style for Markup family destinations is HTMLBlue.
Restriction: When you open the destination, a style sheet is written and linked to the body file.
Therefore, you cannot make style sheet changes from within your SAS program. For
example, after the destination is open, changing the value of the STYLE= option has
no effect. You can make style changes in either of the following ways:
• Close the destination, edit or create a new style sheet, and submit the program
again specifying the new or modified style sheet.
• Edit the body file, changing the style sheet URL to the desired style sheet.
Interaction: By default, when you execute a procedure that uses the FORMCHAR system option
(for example, PROC PLOT or PROC CHART), ODS formats the output in SAS
Monospace font. If you are creating output that will be viewed in an operating
environment where SAS software is not installed, this output is not displayed
correctly. This is because without SAS, the SAS Monospace font is not recognized.
To make your document display correctly, include the following statement before
your SAS program:
OPTIONS FORMCHAR="|----|+|---+=|-/\<>*";
z/OS specifics: If you use graphics that are created with either the ACTXIMG or JAVAIMG device
drivers in the z/OS operating environment, then specify either the GPATH= option or
the PATH= option in the ODS HTML statement.
Note: The ODS HTML statement supports Scalable Vector Graphics. Scalable Vector
Graphics (SVG) is an XML language for describing two-dimensional vector graphics.
For more information about creating SVG files in SAS/GRAPH, see Chapter 9,
“Using SVG Graphics,” in SAS/GRAPH: Reference. For information about SVG and
Universal Printing, see “Creating SVG (Scalable Vector Graphics) Files Using
Universal Printing” in Chapter 15 of SAS Language Reference: Concepts.
Syntax
ODS HTML <(<ID=> identifier)> < action> ;
ODS HTML <(<ID=> identifier)> <option(s)> ;
Summary of Optional Arguments
(ID= identifier)
Open multiple instances of the same destination at the same time
ANCHOR= 'anchor-name'
98 Chapter 5 • Dictionary of ODS Language Statements
Specify a unique base name for the anchor tag that identifies each output
object in the current body file
ARCHIVE='string'
Specify which applet to use to view ODS HTML output
ATTRIBUTES= (attribute-pair-1 ... attribute-pair-n)
Specify attributes to write between the tags that generate dynamic graphics
output
BASE= 'base-text'
Specify text to use as the first part of all links and references that ODS
creates in output files
BODY= 'file-specification' (suboption(s))
Open a markup family destination and specify the file that contains the
primary output that is created by the ODS statement
BOX_SIZING=(CONTENT_BOX | BORDER_BOX)
Specify how to measure the width of cells. Use to override the default value
of BOX_SIZING for a destination
CHARSET= character-set
Specify the character set to be generated in the META declaration for the
HTML output
CLOSE
Close the destination and the file that is associated with it
CODE= 'file-specification' <(suboption(s))>
Open the HTML destination and specify the file that contains relevant style
information
CODEBASE='string'
Create a file path that can be used by the GOPTIONS devices
CONTENTS= 'file-specification' <(suboption(s))>
Open the HTML destination and specify the file that contains a table of
contents for the output
CSSSTYLE= 'file-specification'<(media-type-1<…media-type-10>)>
Specify a cascading style sheet to apply to your output
DEVICE= device-driver
Specify a device for the output destination
DOM<="external-file">
Specify that the ODS document object model is written to the SAS log or to
an external file.
ENCODING= local-character-set-encoding
Override the encoding for input or output processing (transcodes) of external
files
EVENT=event-name (FILE= | FINISH | LABEL= | NAME= | START | STYLE= |
TARGET= | TEXT= | URL= )
Specify an event and the value for event variables that is associated with the
event
EXCLUDE exclusion(s) | ALL | NONE
Exclude output objects from the destination
FRAME= 'file-specification' <(suboption(s))>
Specify the file that integrates the table of contents, the page contents, and the
body file
GFOOTNOTE | NOGFOOTNOTE
Control the location where footnotes are printed in the graphics output
ODS HTML Statement 99
Get SAS 9.4 Output Delivery System, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.