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

VSAM - Control Interval and Control Area


In non-VSAM data management methods, the unit of data that is moved between memory and the storage device is defined by the block.

In VSAM, the unit of data that is transferred in each physical I/O operation is defined as a control interval.

Control Interval consists of,

  • Logical Records

  • Control information fields

  • Free Space

When a VSAM dataset is loaded, control intervals are created and records are written into them.

With KSDS clusters, the entire control interval is usually not filled. Some percentage of free space is left available for expansion. free space which may later be used to contain inserted records.

With ESDS clusters, each control interval is completely filled before records are written into the next control interval in sequence.

With RRDS clusters, control intervals are filled with fixed-length slots, each containing either an active record or a dummy record. Slots containing dummy records are available for use when new records are added to the dataset.


Control Interval Structure:

vsam control interval structure
Explanation:
  • Data or records − Records which are stored in Control Interval.

  • Freespace – It can be used for further expansion of dataset.

  • RDF − RDF is abbrevated as Record Definition Fields. RDF are 3 bytes long. It describes the length of records and tells how many adjacent records are of the same length.

  • CIDF − CIDF is abbrevated as Control Interval Definition Fields. CIDF are 4 bytes long and contain information about the Control Interval.


Control Area

A Control Area (CA) is formed by putting together two or more Control Intervals. A VSAM dataset is composed of one or more Control Areas. The rules used for filling and writing control areas are similar to those which apply for control intervals.

For ESDS clusters, control areas are filled with control intervals that contain records.

For KSDS clusters, some of the control intervals in each control area may consist entirely of free space that can be used for dataset expansion.

For RRDS clusters, control areas are filled with control intervals that contain records.

Control Area Structure:

vsam control area structure

There are two types of splits used extensively in VSAM.

  1. Control Interval Split:

    CI-SPLIT Movement of some records from an existing CI to another free CI in the same CA because a record add or update cannot be accommodated in the existing one.

    A CI split requires a number of I/O operations and this degrades the performance of the VSAM file. The correct amount of the space will need to be allocated for the CI (internal percentage of free space allocation). This will result in two half-empty CI's instead of one full and one empty CI.

  2. Control Area split:

    CA-SPLIT Movement of the half of the records in an existing CA to a new CA because a record add or update cannot be accommodated in the existing CA. This results in two approximately half-full CA's instead of one full and one empty CA. This is inefficient because it involves a high level of I/O operations.


Interview Questions:

  1. What is control interval split?

    If there isn't enough space in the control interval. VSAM performs a control interval split by moving some records to the free control intervals.

  2. What is control area split?

    If there isn't a free control interval for split. VSAM performs a control area split by allocating a new control area and moving half of the control intervals to it.


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