VSAM - How to create the VSAM/What is cluster?VSAM Structure VSAM Creating Utility
The CLUSTER is the solution which is used to create the VSAM
VSAM entry-sequenced, key-sequenced, and relative-record data sets are can be define through access method services (IDCAMS).
DEFINE CLUSTER access-method services will be used to define VSAM data sets (clusters) along with data and index component.
Defining VSAM datasets includes creating an entry in an integrated catalog without any data transfer.
The below information is mandatory to create the dataset
- Name of the entry
- Name of the catalog to contain this definition
- Organization (sequential, indexed, or relative)
- Device and volumes that the data set will occupy
- Space required for the data set
- Record size and control interval sizes (CISIZE)
A VSAM cluster is a logical definition for to create the VSAM data set of any type and it has one or two of the below components:
- The data component of a VSAM cluster contains the data records.
- The index component of a VSAM key-sequenced cluster consists of the index records.
Data component of VSAM:
Data component of VSAM contains the data records on which will be a collection of Control intervals and control areas.
- Control intervals are the units where the VSAM stores records in the data component.
- The control interval is the VSAM equivalent for block and it is the unit of data that is actually transmitted when records are read or written.
- Control Interval contains records, free space and control information.
- The records in the Control Interval are all placed in the beginning of the Control Interval with key of each record followed by the actual record.
- The end portion of the Control Interval is occupied by control interval descriptor this also has space for specifying the record length of each record in the Control Interval.
- Some of the logical records form a control interval and many control intervals will form the control area.
- The control area (CA) is a fixed length unit of contiguous storage containing a number if CI’s.
- The control area is VSAM interval unit for allocating space within a cluster which are the primary and secondary allocations consist of CA.
- The way of filling the control area is similar to the way of filling records in control interval.
- The number of control intervals per control area depends on how much space is reserved when the dataset is created.
Index component in VSAM:
- VSAM cluster will creates an index component along with the data component.
- Index component consists of two sets
- The index set lists the largest index within each control area and the sequence set lists the largest index within each control interval.
- The sequence set is the lowest level of the index is called the sequence set and it contains primary keys and pointers to the control intervals of the data component.
- There is a one sequence set for one control area.
- The highest record key of every control interval is stored in sequence set.
- The highest record key of the sequence set is stored in first level of index set.
- Based on the size of control interval of index component, there will be 1-3 levels of index sets in the index component of the dataset
VSAM Structure VSAM Creating Utility