Volume Table of Contents


In the storage architecture of OS/360 and successors, CMS, and DOS/360 and successors, the Volume Table of Contents is a data structure that provides a way of locating the data sets that reside on a particular DASD volume. With the exception of the IBM Z compatible disk layout in Linux on Z, it is the functional equivalent of the MS/PC DOS File Allocation Table, the NTFS Master File Table, and an inode table in a file system for a Unix-like system. The VTOC is not used to contain any IPLTEXT and does not have any role in the IPL process, therefore does not have any data used by or functionally equivalent to the MBR. It lists the names of each data set on the volume as well as size, location, and permissions. Additionally, it contains an entry for every area of contiguous free space on the volume. The third record on the first track of the first cylinder of any DASD volume is known as the volume label and must contain a pointer to the location of the VTOC. The location of the VTOC may be specified when the volume is initialized. For performance reasons it may be located as close to the center of the volume as possible, since it is referenced frequently. A VTOC is added to a DASD volume when it is initialized using the Device Support Facilities program, ICKDSF, in current systems.
When in OS/360 and successors allocates a data set, it generally searches the catalog to determine the volumes on which it resides. When a program opens a Direct Access Storage Device dataset, the OPEN routine searches the VTOC index if there is one, or directly searches the VTOC if there is no VTOCIX.

Data Set Control Block types

The VTOC consists of a sequence of 140-byte records known as Data Set Control Blocks. There are ten types of DSCB.
DSCB format typePurposeNotes
0Empty entry
1Data set primaryDescribes first three extents of a data set
2ISAM data setDescribes ISAM data sets
3Data set extensionDescribes data set extents after the third
4VTOCDescribes volume attributes
5Free space26 extents on non-index volumes
6Shared Cylinder AllocationIn OS/360, Format 6 DSCB is used for Shared Cylinder Allocation, which enabled multiple datasets to be interleaved across a range of cylinders. This was intended as a performance optimisation to reduce head movement when two or more datasets were expected to be used simultaneously. In current releases of z/OS, shared cylinder allocation format 6 DSCB is no longer supported.
7Free spaceExtension of Format 4 DSCB
8Data set primaryEAV version of Format 1 DSCB
9Data set extensionEAV extension of Format 3 DSCB

The VTOC must reside within the first 64K tracks on the volume, and The first DSCB in the VTOC is always a format 4 DSCB which describes the VTOC itself and attributes of the DASD volume on which this VTOC resides. The second DSCB is always a format 5 DSCB which describes free space within the VTOC. Normally, the rest of the VTOC will contain format 0 DSCBs, which are empty entries, and format 1 or format 3 DSCBs, which describe the extents of data sets, giving their start address and end address of up to 16 such extents on disk. The initial part of a data set is described by a format 1 DSCB. If necessary, format 3 DSCBs are used to describe further extents of the data set. When a data set is deleted, its format 1 DSCB is overwritten to become a format 0 DSCB, and the format 3 DSCB, if one exists, is similarly deleted.
Originally, a VTOC search was a sequential scan of the DSCBs, stopping when the correct format 1 DSCB was found or the end of the VTOC was reached. As DASD volumes became larger, VTOC search became a bottleneck and so a VTOC index was added.

Format 1 DSCB

This VTOC entry describes a dataset and defines its first three extents. This is the format of the DSCB from OS/360 Release 21.7 in 1973, prior to changes for Y2K.
PositionLengthDescription
044Dataset name, left-adjusted and space-filled
this is the DSCB record key.
441Format identifier, '1' for Format-1 DSCB
456Volume serial number of first DASD volume for this dataset
512Volume sequence number of this volume for multi-volume datasets
533Dataset creation date one byte for year of century and two bytes for day-of-year
563Dataset expiration date
99365 indicates that this dataset will never expire.
591Number of extents for this dataset
601If this dataset is a partitioned dataset this is the number of bytes used in the last directory block.
611Unused, listed as reserved by IBM.
6213Code identifying the operating system that created this dataset.
757Unused, listed as reserved by IBM.
822Code indicating dataset organization
841Code indicating the record format of this dataset
851Option code, other options specified when the dataset was created
862Block size
882Record length
901Key length if this file has recorded record keys.
912Position of the key in the record relative to zero.
931Indicator bits, for example indicating that the dataset is password-protected.
944Dataset allocation parameters, indicating, for example that space for this dataset is to be allocated in blocks, cylinders, etc.
953Secondary allocation quantity: Number of blocks, cylinders, etc. to be allocated if additional space is required.
For example, if the dataset is created with the DD card specification SPACE= the dataset is initially allocated four cylinders, and an additional two cylinders, not necessary contiguous, will be allocated each time more space is needed, up to fifteen additional extents.
983DASD address of last block written in the dataset.
1012Number of bytes remaining on last track following last block indicated above.
1032Unused, listed as reserved by IBM.
10510Description of first or only extent.
Type of extent,
extent sequence number,
extent starting cylinder and track,
extent ending cylinder and track.
11510Description of possible second extent, same format as above.
12510Description of possible third extent, same format as above.
1355Pointer to Format-2 DSCB in VTOC in format cylinder/head/record if this is indexed dataset.
Pointer to Format-3 DSCB if this dataset has more than three extents.