TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

VSAM - Catalog


What is VSAM Catalog?

CATALOG is a list of entries consisting of Data Set Name / Volume Label pairs. When a data set name is allocated on a disk volume, z/OS updates a "catalog" inserting an entry with the data set name / volume label pair. Request to access an existing data set name starts with search of the "catalog".

When a non-VSAM dataset is created, the user has the option, by means of the DISP=(,CATLG) JCL entry, of creating a catalog entry for the dataset. The catalog keeps track of the unit and volume on which the dataset resides and can be used for later retrieval of the dataset. With VSAM datasets, creation of a catalog entry to record the unit and volume, as well as many other characteristics of the dataset, is not optional.

Prior to VSAM, catalog entries for non-VSAM datasets were contained in OS CVOLS (operating system control volumes). VSAM maintains its own catalog, which is itself a KSDS cluster, into which catalog entries describing VSAM clusters are recorded. The same VSAM catalog may also be used to contain the catalog entries for non-VSAM datasets.

The below diagram shows the type of VSAM catalogs.

vsam catalog

Master Catalog:

z/OS can manage many thousands of disk volume labels and millions of data set names. But not all these cataloged data set name / volume label pairs in one place.

z/OS has a Master Catalog (MCAT) which is a VSAM data set type. A z/OS system has one and only one MCAT.

The master catalog contains entries about system datasets and VSAM structures used to manage the operation of VSAM.

Master catalog owns all VSAM resources in operating system. All files used in VSAM are controlled by master catalog. Master catalog is responsible for following operations.

  • VSAM access for files

  • Location of file

  • Enhancing the Security

  • Password Authorization for files

  • Space Management of file

  • Free Space available in file

If any of the above file attributes changes, they are automatically updated in master catalog.

The MCAT could store millions of data set name / volume label pairs. But the "best practice" is to only store critical operating system data set name / volume label pairs in the MCAT. The business data set name / volume label pairs are stored in User Catalogs (UCAT)s.

User Catalog:

z/OS has many User Catalog's. Each UCAT is defined by the storage administrator or systems programmer.

A user catalog is a catalog created to contain entries about application specific datasets. The information defining a user catalog is stored into a catalog entry in the master catalog.

User catalog has same structure and concepts as the master catalog. It is present at next hierarchy level after master catalog. User catalog is not mandatory in the system but it is used to enhance security of VSAM system.

Master catalog points to VSAM files but if User catalog is present then master catalog points to user catalog. User catalogs can be many in number as per the system requirement. In VSAM structure if master catalog is removed then it will not affect the user catalog. User catalog contain entries about application specific datasets. The information of user catalog is stored in master catalog.

Data Space:

Data space is an area of the direct access storage device that is exclusively allocated for VSAM. Data space must be created before creating VSAM clusters. The area occupied by the data space is recorded in the Volume Table of Contents (VTOC), so that the space will not be available for allocation to any other use, either VSAM or non-VSAM. VTOC has entry of area occupied by space. VSAM creates a data space to hold the user catalog entries. VSAM takes control of this space and monitors and maintains this space as needed by VSAM files.

Unique Clusters:

It is possible to create VSAM clusters out of unallocated space on direct access storage. This type of cluster has a designation of UNIQUE and essentially consists of a separate data space which is utilized completely by the cluster created within it.

Sub-allocated Clusters:

A sub-allocated VSAM file shares the VSAM space with other sub-allocated files. It specifies that file should be sub-allocated within existing VSAM space. Sub-allocation is used for easier management and control of VSAM spaces.

Non-VSAM datasets:

Non-VSAM datasets resides on both tape and direct access storage. Non-VSAM datasets may have entries in both master catalog and user catalogs. The main function of cataloging non-VSAM datasets is to retain unit and volume serial information.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal