VSAM - Components
VSAM consists of the following components -
- Cluster VSAM
- Control Area
- Control Interval
VSAMs are logical data sets for storing records and are called clusters. A cluster is an association of the index, the set of sequences, and the data parts of the data set. The space occupied by a VSAM cluster is Check intervals . We will discuss check intervals later in this module.
There are two main components in a VSAM cluster -
Index component contains the index part. Index records are present in the Index component. By using the index component, VSAM is able to retrieve records from the data component.
The data component contains the data part. The actual data records are present in the Data component.
Check intervals (CI) in VSAM are equivalent to blocks for non-VSAM datasets. In non-VSAM methods, the data unit is defined by the block. VSAM works with a logical data area known as check intervals.
Check intervals are the smallest unit of transfer between a disk and the operating system. Whenever a record is read directly from memory, the entire IC containing the record is read into the VSAM I / O buffer. The desired recording is then transferred to the work area from the VSAM buffer.
The monitoring interval consists of -
- Logical records
- Information fieldsChecks
- Free Space
When a VSAM dataset is loaded, check intervals are created. The default check interval size is 4KB and can expand up to 32KB.
Check interval parsing
Here is the deion of terms used in the above program -
R1..R5 - Records stored in the monitoring interval.
FS - FS is free space, which can be used for further expansion of the dataset.
RDF - RDF is known as Record Definition Fields. RDF is 3 bytes long. It describes the length of records and indicates how many adjacent records are the same length.
CIDF - CIDF is known as control interval definition fields. CIDFs are 4 bytes long and contain information about the interval control.
A checkbox (CA) is formed by combining two or more check intervals. A VSAM dataset is made up of one or more control areas. VSAM's size is always a multiple of its control area. VSAM files are expanded in units of control areas.
Here is the example of the control area -