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

VSAM - Components


VSAM consists of following three components.

  1. VSAM Cluster

  2. Control Area

  3. Control Interval

VSAM Cluster

VSAM are the logical datasets for storing records and are known as clusters. A cluster is an association of the index, sequence set and data portions of the dataset. The space occupied by a VSAM cluster is divided in contiguous areas called Control Intervals. We will discuss about control intervals in next chapter module.

There are two main components in a VSAM cluster.

  1. Index Component contains the index part. Index records are present in Index component. Using index component VSAM is able to retrieve records from the data component.

  2. Data Component contains the data part. Actual data records are present in Data component.


ESDS Cluster Components

  • The records in an ESDS cluster are stored in the order in which they are entered into the dataset.

  • Each record is referenced by its relative byte address (RBA). In an ESDS dataset of 100 byte records, the RBA of the first record is 0, the RBA of the second record is 100, the RBA of the third record is 200, etc.

  • The records in an ESDS may be accessed sequentially, in order by RBA value, or directly, by supplying the RBA of the desired record.

  • The records of an ESDS cluster may be fixed length or variable length.

  • Records may not be deleted from an ESDS cluster, and they may only be added (appended) to the end of the dataset, following records previously written.


KSDS Cluster Components

  • Each record in the data component of a KSDS cluster contains a key field, which must be the same number of characters and occur in the same relative position in each record.

  • The records are stored in the data component in logical sequence based upon their key field value.

  • The index component of the KSDS cluster contains the list of key values for the records in the cluster with pointers to the corresponding records in the data component.

  • The records in a KSDS may be accessed sequentially, in order by key value, or directly, by supplying the key value of the desired record.

  • The records of a KSDS cluster may be fixed length or variable length.

  • Records may be added or deleted at any point within a KSDS cluster, and the affected record is inserted or removed, and the surrounding records will be reorganized as required to maintain the correct logical sequence.


RRDS Cluster Components

  • The records in an RRDS cluster are stored in fixed length slots.

  • Each record is referenced by the number of its slot, which is a number varying from 1 to the maximum number of records which may be contained in the dataset.

  • The records in an RRDS cluster may be accessed sequentially, in relative record number order, or directly, by supplying the relative record number of the desired record.

  • The records of an RRDS cluster must be of fixed length.

  • Records may be added to an RRDS cluster by writing a new record's data into an empty slot, and records may be deleted from an RRDS cluster, thereby leaving an empty slot where the record that was deleted was previously stored.


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