To locate a data set, a program will generally interrogate a z/OS catalog to find the volume where the data set resides. Having found the correct volume, the VTOC is searched to find out where on the disk the data set is stored.
The VTOC comprises records known as Data Set Control Blocks, or DSCBs. There are seven types of DSCB.
|DSCB format type||Purpose||Notes|
|1||Data set primary||Describes first three extents of a data set|
|2||ISAM data set||Describes ISAM data sets|
|3||Data set extension||Describes data set extents after the third|
|4||VTOC||Describes volume attributes|
|5||Free space||Redundant if the VTOC is indexed|
|7||Free space||Only used for a limited set of devices|
The first DSCB in the VTOC is always a format 4 DSCB which describes the VTOC itself and attributes of the disk 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 data sets, giving their start address 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 parts of the data set. When a data set is deleted, its format 1 DSCB is overwritten to become a format 0 DSCB.
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 disk volumes became larger, VTOC search became a bottleneck and so a VTOC index was added.