A Key Sequenced Data Set (KSDS) has two parts: a data component and an index component. The index component includes an index set and a sequence set. Including free space can improve the performance of the KSDS.

KSDS Free space
Photo by Google DeepMind on Pexels.com

KSDS Index

At the lowest level of the index is the sequence set. This set determines the control interval where a specific record is stored. On the other hand, the index set comprises records at multiple levels that direct to the sequence set records.

The entries in the index set record contain the highest key values stored in each of the sequence set records, and the entries in the sequence set records contain the highest key values stored in each of the control intervals.

Random Access

To locate a particular record in VSAM, the system first searches through the index set to find the corresponding sequence set. From there, it looks for the control interval that contains the desired record and reads it into the virtual storage. Then, it searches through the keys of the records in that control interval until it finds the specific record.

Free space

The free pointer shown in each sequence set record points to free control intervals in the control area. There is also control information within each control interval that identifies the free space in the interval.

By using the free pointers and control information, VSAM is able to manage the free space as it adds records to a KSDS.

VSAM updates the records in the index and sequence sets while adding them. This allows the dataset to be used for sequential and random processing using the primary key.

Free space enhances performance by minimizing the chances of control interval and control area splits.

Performance

To improve performance, the systems programmer tries to define a production KSDS in a way the index set reads into internal storage areas (buffers). It is how it improves KSDS performance.

Related Posts