Control interval
The unit in which VSAM stores and reads records, the VSAM equivalent of a block.
Also written CI, CA, control area, CI split, CA split, FREESPACE, CISZ
A control interval, or CI, is the unit of storage VSAM reads and writes, much like a block in other datasets. Each CI holds some records, some free space, and a little control information at the end that describes what is in it. CIs are grouped into larger units called control areas, or CAs.
In a KSDS, records are kept in key order inside each CI. When a new record has to go between two existing ones, VSAM uses the free space in that CI. The FREESPACE option on the IDCAMS definition sets how much room is left in each CI and CA for this when the file is loaded.
If a CI is full, VSAM splits it: it moves about half the records to an empty CI. If no empty CI is left in the CA, the whole CA is split. Splits are normal, but many of them make the file slower to read in order and use more space.
The usual fix is to reorganise the file: copy it out with REPRO, delete and define it again, and copy it back, which puts records in order and restores the free space. The CI size is set with CISZ, though VSAM usually chooses a sensible one.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- VSAMA family of dataset types built for fast record access by key, used where applications need to look records up rather than read them in order.
- KSDSThe most common VSAM dataset type, where every record has a unique key used to find it directly.
- IDCAMSThe utility used to create, list, copy and delete datasets, and the standard tool for anything involving VSAM.
- Block sizeHow much data is moved between disk and memory in one go, written as BLKSIZE.
- REPROAn IDCAMS command that copies records from one file into another. It is the usual way to load a VSAM file.