A GRSEG is a SAS catalog
entry that contains graphics commands in a generic, device-independent
format. There are few cases in which you would be concerned with the
GRSEGs. One case for using the GRSEGs is when combining multiple graphs
into a single graphics output file using the GREPLAY procedure (see
Using the GREPLAY Procedure to Store Multiple Graphs in One Graphics Output File). Beyond this case, there are few reasons to use the GRSEGs. If
you plan to use the GRSEGs, you must understand when they are generated
and where they are stored.
GRSEGs are supported
by the
SAS/GRAPH procedures
that use the graphics output devices with some exceptions. The procedures
that are supported by only the JAVA, JAVAIMG, ACTIVEX, and ACTXIMG
devices, such as GKPI, GTILE, and GAREABAR, do not support GRSEGs.
A procedure that generates
a GRSEG produces output in two steps:
-
It creates a GRSEG in
a SAS catalog.
-
It uses a graphics output
device to translate the commands from the GRSEG to commands that a
particular graphics device understands. This is called device-dependent
output.
This method enables
you to produce graphics output on several types of graphics output
devices.
A GRSEG is stored in
a catalog in the SAS temporary directory. The graphics instructions
that are contained in the GRSEG are understood only by the
SAS/GRAPH software. You cannot
use third-party graphics applications to view the graphic in a GRSEG.
The
SAS/GRAPH software
provides devices that enable you to output a GRSEG to standard graphics
formats such as GIF, PNG, and PDF, which you can view using third-party
applications.
SAS/GRAPH software always assigns a name and a description to
each GRSEG so that you can identify it. By default, the names and
descriptions are determined by the procedure. For example, a GRSEG
produced by the GCHART procedure is assigned the name GCHART and a
description such as PIE CHART OF MONTH.
By default,
SAS/GRAPH appends each new GRSEG to the catalog. If
you create more than one graph with a procedure during a SAS session
and the GRSEGs are stored in the same catalog,
SAS/GRAPH software appends a number to the
end of the name of subsequent GRSEGs. This number makes the names
unique within the catalog. For example, if you create three graphs
with the GCHART procedure during the same SAS session, the GRSEGs
are named GCHART, GCHART1, and GCHART2.
SAS/GRAPH software uses this naming convention whether GRSEGs
are being stored in a temporary or a permanent catalog.
You can supply a name
and description when you create the graph by using the NAME= and DESCRIPTION=
options. If you create more than one graph of the same name, the
SAS/GRAPH software increments
the specified name just as it does the default names.