Jump to content

Volume Table of Contents

From Alfawiki
Volume Table of Contents (VTOC)
Company typeData structure
IndustryComputer storage, Mainframe operating systems
Founded1960s
Headquarters
United States
ProductsDataset allocation and management on DASD volumes

In the storage design of OS/360 and successors, CMS, and DOS/360 and successors, the Volume Table of Contents (VTOC) serves as a key data structure that identifies the locations of data sets on a particular DASD volume. Apart from the IBM Z compatible disk layout used in Linux on Z, its role parallels that of the MS/PC DOS File Allocation Table (FAT), the NTFS Master File Table (MFT), and the inode table found in Unix-like file systems. The VTOC contains entries for each data set’s name, size, position, and access permissions, as well as records for all contiguous free spaces on the volume.

Located on the first track of the initial cylinder of any DASD volume, the third record is the volume label, which must reference where the VTOC is situated. To optimize access speed, the VTOC is commonly placed near the volume’s midpoint due to its frequent use. The VTOC is established during DASD volume initialization by IBM’s Device Support Facilities utility, ICKDSF, which superseded earlier tools no longer compatible with modern hardware.

Within OS/360 and its successors, allocating data sets generally involves querying a catalog to determine appropriate volumes. When a DASD data set is accessed, the system’s OPEN routine will search through the VTOC index (VTOCIX) if it exists; otherwise, it directly scans the VTOC.

Data Set Control Block types

The VTOC is made up of 140-byte entries known as Data Set Control Blocks (DSCBs), which come in ten distinct types.

DSCB types found in a VTOC
DSCB format type Function Description
0 Empty entry
1 Data set primary Defines the first three extents of a data set (starting and ending cylinders and tracks)
2 ISAM data set Represents ISAM data sets
3 Data set extension Covers additional extents beyond the initial three
4 VTOC Contains volume-specific attributes
5 Free space Lists up to 26 extents on volumes without an index
6 Shared Cylinder Allocation Utilized in OS/360 for interleaving datasets across cylinders to enhance performance; this is obsolete in current z/OS versions
7 Free space Extension of Format 4 DSCB
8 Data set primary EAV[note 1] variant of Format 1 DSCB
9 Data set extension EAV counterpart of Format 3 DSCB

The VTOC occupies space within the first 64K tracks on a volume. Its initial DSCB is always a format 4 record describing both the VTOC itself[note 2] and various DASD volume characteristics. Following this, a format 5 DSCB outlines free space within the VTOC. The remaining entries usually consist of format 0 DSCBs (empty slots) alongside format 1 or format 3 DSCBs that specify data set extents, each defined by starting and ending CCHH addresses relative to the disk’s origin.

Format 1 DSCBs specify the first extents of a data set, while format 3 DSCBs cover any subsequent extents. When data sets are deleted, their corresponding format 1 and any linked format 3 DSCBs are cleared by overwriting them as format 0 entries.

Originally, searching through the VTOC involved scanning DSCBs sequentially, which became inefficient as DASD volumes increased in size. To address this performance issue, a VTOC index was later introduced.

Format 1 DSCB

This VTOC record specifies a dataset along with its initial three extents, employing the DSCB format introduced in OS/360 Release 21.7 (1973), prior to modifications related to the Y2K issue.

Position Length Description
0 44 Dataset name, left-aligned and padded with spaces; acts as the DSCB record key.
44 1 Format indicator, '1' representing Format-1 DSCB (character)
45 6 Volume serial number of the first DASD volume containing this dataset (alphanumeric)
51 2 Sequence number for volumes in multi-volume datasets (binary)
53 3 Dataset creation date (binary): one byte for year within century, two bytes for day of year
56 3 Dataset expiration date (same format); value 99365 denotes no expiration set.
59 1 Count of extents allocated to this dataset (binary)
60 1 For partitioned datasets, number of bytes used in the final directory block (binary)
61 1 Reserved field by IBM
62 13 Operating system code that created this dataset (character)
75 7 Reserved by IBM
82 2 Code representing dataset organization type (sequential, indexed, etc.) (bitfield)
84 1 Code indicating record format type (fixed, variable, etc.) (bitfield)
85 1 Option code assigned during dataset creation (bitfield)
86 2 Block size or maximum block size for variable-length records (binary)
88 2 Record length or maximum length for variable-length records (binary)
90 1 Length of key if dataset contains record keys (binary)
91 2 Key position within record relative to zero-based offset (binary)
93 1 Indicator bits such as password protection flags (bitfield)
94 4 Dataset allocation parameters specifying allocation units (bitfield)
95 3 Secondary allocation amount: blocks or cylinders allocated when additional space is required (binary)

Example: SPACE=(CYL,(4,2)) means four cylinders are allocated initially with two more added each time extra space is needed.

98 3 DASD address of the last block written
101 2 Number of bytes remaining on the last track after the last block (binary)
103 2 Reserved by IBM
105 10 Description of first or sole extent:
Type (1 byte, bitfield), extent sequence number (1 byte, binary), starting cylinder/track address (4 bytes, binary), ending cylinder/track address (4 bytes, binary).
115 10 Description of second extent; same structure as above.
125 10 Description of third extent; follows same format.
135 5 Pointer to Format-2 DSCB if dataset is indexed,
or to Format-3 DSCB if more than three extents exist.

See also

External links

  • z/OS 2.5 - DFSMS Using Data Sets, IBM, March 24, 2023
  • z/OS 2.5 - DFSMSdfp Advanced Services, IBM, March 24, 2023
  • z/OS System IPL: Sequence and key controls, IBM


Cite error: <ref> tags exist for a group named "note", but no corresponding <references group="note"/> tag was found