Now we can write a program to read and dump some records from our DASD volume.  Because I formatted the volume there should be three data records on Cylinder zero, Track zero (R1,R2, and R3).  Record 3 is the Volume Label record and will have the address of the Volume Table Of Contents (VTOC).

The Volume Record has a 4-byte key and an 80-byte data area.  We are only concerned with the following data fields:

Key:
     CL4    'VOL1'

Data:
     CL4    'VOL1'
     CL6    volser
     CL1
     XL5    vtoc address (cchhr)

The VTOC is a special file that describes the data sets and free space on the volume.  The records in the VTOC are called Data Set Control Block (DSCB) records.  Each record consists of a 44-byte key and a 96-byte data area. There are six different types of DSCB records (Format 1 through Format 6).

The first DSCB is always a Format 4.  The 44-byte key contains a special string of characters x’040404….04′ which identifies it as the FMT4 DSCB. Data of interest to us include:

This information will allow us to read the VTOC and find other data sets located on this volume.

[Next – DISK1 Program]