| SAS/GRAPH Software: Reference |
When you run a SAS/GRAPH procedure
that produces graphics output, a copy of the graphics output is always stored
in a SAS catalog. A catalog is a type of SAS file in which you
can store different types of information, called catalog entries.
Catalog entries of type GRSEG store graphics output. In addition, SAS/GRAPH procedures
create other types of catalog entries such as DEV, CMAP, FONT, and TEMPLATE.
You can store multiple catalog entries in one catalog.
You can use catalog entries to store graphics output that you
want to display again without having to rerun the program. Use the GRAPH window,
the GREPLAY procedure, or the SAS Explorer window to redisplay graphics output
stored in catalog entries.
SAS catalogs can be either temporary
or permanent. Temporary catalogs are erased at the end of each
SAS session and cannot be retrieved. Permanent catalogs are
retained until you delete them. Therefore, they exist after the end of a SAS
session and can be used in later SAS sessions.
Unless you
select another catalog, either temporary or permanent, SAS/GRAPH procedures
always store a copy of your graph in the temporary catalog WORK.GSEG, regardless
of the other forms of graphics output that you choose. By default, each graph
is appended to the catalog. The graphs in WORK.GSEG are erased
when you end the SAS session.
- CAUTION:
- You can
read Version 6 catalogs from Version 7, but you cannot write to them unless
you port them to Version 7.
![[cautend]](../common/images/cautend.gif)
In some cases you have to specify an engine to read
a Version 6 catalog from Version 7:
For more information, see
Transporting Catalogs across Operating Environments.
All Version 7 applications that support catalog entries
that also existed in Version 6 should be able to transparently read those
Version 6 catalog entries. That is, if a Version 7 user specifies the SASEB
(Version 6 compatibility) engine on the LIBNAME statement, the application
should be able to read and process any Version 6 data that the SASEB engine
may return.
The Version 7 compatibility engine also supports write
access to Version 6 catalogs.
To create or specify a catalog
for graphics output, use the
GOUT= option in a PROC statement. The general form is
|
PROC procedure-name GOUT=<libref.>
catalog-name;
|
-
procedure-name
-
is the graphics procedure you are running.
-
<libref.>catalog-name
-
is the name of a catalog where you want
the output stored. If the specified catalog already exists, the procedure
simply adds a catalog entry to the catalog. If the catalog does not exist,
it is created.
For a temporary catalog, specify the name of the catalog
and omit the libref. (This is a one-level name.) The temporary
catalog is stored in the WORK library and erased when you end the SAS session.
For a permanent catalog, specify both a libref and a
catalog name. (This is a two-level name.) Libref
must already be assigned to a SAS data library that contains or will contain
the catalog. For more information on assigning a libref, see
LIBNAME Statement.
When you run the procedure, the output is
automatically
appended to the end of the specified catalog. If the procedure produces multiple
graphics, then multiple entries are added to the catalog.
If you want a catalog entry to replace all
of the existing entries in the catalog, you can use the following statement:
goptions goutmode=replace;
- CAUTION:
- Be careful using GOUTMODE=REPLACE.
GOUTMODE=REPLACE replaces all existing entries in the output
catalog. You cannot retrieve previous entries once they have been replaced.
See GOUTMODE
for more information.
![[cautend]](../common/images/cautend.gif)
SAS/GRAPH software always
assigns a name and a description to each catalog entry so you can identify
it. By default, the names and descriptions are determined by the procedure.
For example, a graph produced by the GCHART procedure would be assigned the
name GCHART and a description like PIE CHART OF MONTH.
By default, SAS/GRAPH appends
each new entry to the catalog. If you create more than one graph with a procedure
during a SAS session and the graphs are stored in the same catalog, SAS/GRAPH software
adds a number to the end of the name of subsequent catalog entries. 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 catalog
entries are named GCHART, GCHART1, and GCHART2. SAS/GRAPH software
uses this naming convention whether catalog entries are being stored in a
temporary or 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, SAS/GRAPH software
increments the specified name just as it does the default names.
You can use the SAS Explorer window or the PROC GREPLAY window to display
a list of all of the entries in a catalog. To open the Explorer window for
a specific catalog, use the CAT command:
To open the PROC GREPLAY
window, submit the PROC GREPLAY
statement with or without a catalog specification. For details, see The GREPLAY Procedure.
Either method lets you view
individual entries once
you have displayed the list. For more information, see Displaying Graphics Output on Monitors or Terminals.
There are several ways to manage
catalogs and catalog
entries:
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.