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.
You can read Version 6 catalogs from Version 7 and Version 8, but you cannot write to them unless you port them.
In some cases you have to specify an engine to read a Version 6 catalog from the current SAS version:
If you are running the current version and you assign a libref that points to a library that contains only Version 6 catalogs, the correct engine is automatically applied and you can view the entries. However, you cannot write to the catalog without porting it.
If you are running Version 7 or Version 8 and you assign a libref that points to a library that contains both Version 6 and the current version catalogs, the LIBNAME statement must specify the SASEB engine to view the entries in the Version 6 catalog. Even with the engine assigned, you cannot write to the catalog without porting it.
For more information, see Transporting Catalogs across Operating Environments on page 56.
All Version 7 and Version 8 applications that support catalog entries that also existed in Version 6 should be able to
The Version 7 and Version 8 compatibility engines also support 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
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
For a permanent catalog, specify both a libref and a catalog name. (This is a
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:
Be careful using GOUTMODE=REPLACE.
SAS/GRAPH software always
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
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
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
To open the PROC GREPLAY window, submit the PROC GREPLAY statement with or without a catalog specification. For details, see Chapter 43, The GREPLAY Procedure, on page 1237.
Either method lets you view individual entries once you have displayed the list. For more information, see Displaying Graphics Output on Monitors or Terminals on page 49.
There are several ways to manage catalogs and catalog entries:
The GREPLAY procedure can rename, delete, copy, or
The CATALOG procedure can copy or move an entire catalog or selected entries within a catalog, and can rename or delete catalog entries. For details, see Base SAS Procedures Guide .