All ODS graphics are
generated in industry standard formats (PNG, PDF, and so on), depending
on the settings for the active ODS destinations. The ODS HTML destination
is on by default, and the default image format for the HTML destination
is PNG.
All ODS destinations
such as HTML, PDF, RTF, LATEX, and PRINTER are fully supported. The
ODS destinations enable you to
-
manage the graphs that are generated
by ODS Graphics
-
display the output in a variety
of forms (HTML, PDF, RTF, ...)
-
control the location of stored
output files and other features that are relevant for the active destinations.
As discussed in Compiling the Template, a compiled
template is stored in an item store. Thus, without rewriting or resubmitting
the template code, we can render the graph as often as needed during
the current SAS session or a future SAS session.
To generate ODS Graphics
output for use on the Web, we can direct the output to the HTML destination,
which generates an image file for the graph, and also an HTML file
that references the image. Thus, output that is generated in the HTML
destination is ready for display in a Web browser.
The following ODS HTML
statement stores the output files in the folder
C:\myfiles\mywebserver
. The code first closes the LISTING destination to avoid creating
extra output:
ods html path="C:\myfiles\mywebserver" (url=none) file="modelfit.html" ;
proc sgrender data=sashelp.class template=modelfit; run;
ods html close; /* to close the output file */
ods listing; /* reopen the HTML destination for subsequent output */
-
The PATH= option specifies storage
location
C:\myfiles\mywebserver
for
output files that are created by the SAS statements, including images
from ODS Graphics.
-
The FILE= option specifies that
SAS output is written to the file
modelfit.html
, which is saved in the location specified on PATH=.
-
The ODS HTML CLOSE statement closes
the HTML destination, which enables you to see your output. By default,
the HTML destination uses the HTMLBLUE style for graphics output (
Modifying Graph Appearance with Styles provides an introduction to ODS styles),
which uses a gray background.
See Managing Graphical Output for more information
about the ODS destinations and the type of output that results from
each destination.