| SAS/GRAPH Software: Reference |
If you use SAS/GRAPH to generate Web output, the output
must include at least one HTML file and one GIF file. The HTML file contains
the HTML language elements required to view the output in a Web browser, and
the GIF file contains the graphics output. One of the elements in the HTML
file is an <IMG> tag, which identifies the location and name of the GIF
file. For example, this tag references an image named barchart.gif, which
resides in the same location as the HTML file (because no other location is
indicated):
<IMG SRC="barchart.gif">
How an HTML File References a GIF File shows
the relationship between the HTML file's <IMG> tag and the GIF file.
How an HTML File References a GIF File
To view this Web output, use a Web browser to view
the
HTML file, which automatically displays the GIF file that is referenced by
the <IMG> tag. When you view the HTML file, you cannot tell that the graphic
is not part of the HTML file because the <IMG> tag pulls it into the browser.
If the output files are located in your file system,
users with access to that file system can directly open the HTML file. If
the output files are located on a Web server, users with Internet access to
the World Wide Web can access the HTML file through its uniform resource
locator (URL).
When you use the HTML or WEBFRAME device drivers, or
when you use SAS/GRAPH with ODS, SAS/GRAPH
creates all of the HTML and GIF files you need to view the output. In these
cases, you must specify a location in your file system where you want the
output files to be stored. This location must be an aggregate file storage
location (for example, a directory or PDS); it cannot be a file.
When you use the HTML or WEBFRAME device drivers, or
when you use SAS/GRAPH with ODS, the
following alternatives are available for specifying the output location for
the HTML and GIF files:
The names that are assigned to HTML files depend on
the approach you use to generate the Web output.
|
Output from HTML or WEBFRAME Driver |
Output from ODS |
|
You cannot specify a name for the HTML files. Both drivers
always create a file named index.html, which is the file that should be viewed
in the browser.
With the HTML driver, index.html is the only HTML file
that is created. With the WEBFRAME driver, additional HTML files are created,
which the driver also names.
The HTML files always replace the HTML files from
previous procedure runs, unless the output is directed to a different location. |
You assign file names for the HTML files you want created.
You assign the names on the BODY=, CONTENTS=, PAGE=, and FRAME= options.
While the HTML destination is open, each specified HTML
file remains open and additional output is appended to the file, until you
open an alternative file for the output type or close the HTML destination.
If you run the program again at another time without changing the file names
specified, the output from the current program run replaces the output from
the previous program run. |
When you use SAS/GRAPH to generate Web output, the graphs
produced in the program are always saved in two formats: GRSEG catalog entries
and GIF files. In all cases, the GIF file names are always derived from the
catalog entry names of the corresponding graphs.
For example, you can use a procedure's NAME= option
to assign a name of up to eight characters to the catalog entry. If you assign
the name MYGRAPH to the catalog entry, SAS/GRAPH names the GIF file mygraph.gif.
If you do not use NAME=, SAS/GRAPH names
the entry with the first eight characters of the procedure name, for example,
GCHART, in which case SAS/GRAPH names the GIF file gchart.gif. (For more information
on catalog entry names, see Names and Descriptions of Catalog Entries.)
SAS/GRAPH does not replace existing GRSEG entries when
a procedure creates a new entry of the same name. Rather, it adds a number
to the duplicate name to make it unique. For example, if you use a procedure's
NAME= option to name an entry MYGRAPH and an entry named MYGRAPH already exists
in the output catalog, SAS/GRAPH names
the new entry MYGRAPH1, and then names the GIF file mygraph1.gif. Catalog
entry names are limited to eight characters, so if the duplicate name has
eight characters, SAS/GRAPH replaces the final character with the added number.
To replace an existing catalog entry, your program must
first use the GREPLAY procedure to delete the existing catalog. For example,
assume the output catalog is the WORK catalog, and that you use BY-group processing
on the GCHART procedure to run a program that generates three catalog entries
that are named with the default names GCHART, GCHART1, and GCHART2. To run
the same program and ensure that the catalog entries receive the same names,
you must first run the following GREPLAY procedure to delete the three existing
catalog entries before generating the new entries that have the same names:
proc greplay nofs;
delete gchart gchart1 gchart2;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.