SAS 9.1 Language Reference. Concepts
Authors: SAS Institute
Published year: 2004
Pages: 175-177/255
Buy this book on amazon.com >>

Chapter 32: SAS Catalogs

Definition of a SAS Catalog

SAS catalogs are special SAS files that store many different kinds of information in smaller units called catalog entries. Each entry has an entry type that identifies its purpose to SAS. A single SAS catalog can contain several different types of catalog entries. Some catalog entries contain system information such as key definitions. Other catalog entries contain application information such as window definitions, help windows , formats, informats, macros, or graphics output. You can list the contents of a catalog using various SAS features, such as SAS Explorer and PROC CATALOG.



SAS Catalog Names

Parts of a Catalog Name

SAS catalog entries are fully identified by a four-level name in the following form:


libref.catalog.entry-name.entry-type

You commonly specify the two-level name for an entire catalog, as follows :


libref.catalog

libref

  • is the logical name of the SAS data library to which the catalog belongs.

catalog

  • is a valid SAS name for the file.

The entry name and entry type are required by some SAS procedures. If the entry type has been specified elsewhere or if it can be determined from context, you can use the entry name alone. To specify entry names and entry types, use this form:


entry-name.entry-type

entry-name

  • is a valid SAS name for the catalog entry.

entry-type

  • is assigned by SAS when the entry is created.

Accessing Information in Catalogs

In Base SAS software, SAS catalog entries are generally accessed automatically by SAS when the information stored in them is required for processing. In other SAS software products, you must specify the catalog entry in various procedures. Because the requirements differ with the SAS procedure or software product, refer to the appropriate procedure or product documentation for details.



Tools for Managing SAS Catalogs

There are several SAS features to help you manage the entries in catalogs. The CATALOG procedure and the CEXIST function are two features of Base SAS software. Another tool is SAS Explorer, which enables you to view the contents of SAS catalogs. Many interactive windowing procedures contain a catalog directory window for managing entries. The following list summarizes the tools that are available for managing catalogs:

CATALOG procedure

  • is similar to the DATASETS procedure. Use the CATALOG procedure to copy, delete, list, and rename entries in catalogs.

CEXIST function

  • enables you to verify the existence of a SAS catalog or catalog entry. See the CEXIST function in SAS Language Reference: Dictionary for more information.

CATALOG window

  • is a window that you can access at any time in an interactive windowing environment. It displays the name , type, description, and date of last update for each entry in the specified catalog. CATALOG window commands enable you to edit catalog entries. You can also view and edit catalog entries after double-clicking on a catalog file in SAS Explorer.

catalog directory windows

  • are available in some procedures in SAS/AF, SAS/FSP, and SAS/GRAPH software. A catalog directory window lists the same kind of information that the CATALOG window provides: entry name, type, description, and date of last update. See the description of each interactive windowing procedure for details about the catalog directory window for that procedure.


SAS 9.1 Language Reference. Concepts
Authors: SAS Institute
Published year: 2004
Pages: 175-177/255
Buy this book on amazon.com >>