Previous Topic: 5.1.2 VTOC Scan Overview

Next Topic: 5.1.2.2 VCCCVAF--Indexed VTOC Information Retrieval

5.1.2.1 VCCVTOC--VTOC Scan Subtask


The VCCVTOC module scans the VTOCs of DASD devices and
records the data they contain.  VCCVTOC performs the
following functions:

    o  It continually selects devices whose VTOCs are to be
       scanned from the VSCT.  This selection process is
       continued until no more devices remain in the VSCT.
       It performs device selection as follows:

         -  On initial entry, this module selects a device
            from the string that has the most devices to
            process on either the first VSCT physical channel
            that has no active VCCVTOC subtasks operating on
            it, or the VSCT physical channel that has the
            lowest ratio of active VCCVTOC subtasks to
            devices left to process.

         -  It then selects a device from a string on the
            same physical channel that has the most devices
            left to process.  If no more devices remain to be
            processed on a physical channel, it selects a
            device from the physical channel with the most
            devices left to process (if there is a string
            with no active VCCVTOC subtasks operating on it).

    o  Once it has selected a device, the VTOC is ENQ'd
       with the RESERVE macro.  Parameters such as BYPASSRES,
       RESRETRY, and RESFAILOK are used to control the
       reserve process, and the action to be taken if the
       RESERVE fails.  After reserve processing completes,
       the VTOC is allocated and opened for input.

    o  The Format 4 DSCB is then read separately from the
       other DSCBs in order to determine the bounds of the
       VTOC, the number of DSCBs per track, and the number of
       used DSCBs (to terminate the scan).  If the VTOC is
       indexed, it calls the VCCCVAF module to extract
       the number of free DSCBs and to build the volume
       freespace extent record from the VTOC index, because
       this information is not present in the main VTOC when
       an index is used.

    o  It then scans the VTOC by reading in DSCBs one track
       at a time.  Each DSCB is processed only once.  If
       Format 2 or Format 3 DSCBs are encountered first,
       their information will be saved until the Format 1
       DSCB is found.  At this time, a complete SMF record
       can be built and buffered by calling the VCCWRITR
       module.

    o  If a data set of the form SYS1.VVDS.Vvolser is found,
       it is added to the CNQ, chained from the volume table
       for the device on which the VVDS is located.  The
       VCCVVDS module will process these entries later.

    o  After a VTOC scan is complete, the VTOC is CLOSEd,
       deallocated, and DEQ'd (which removes the reserve), if
       necessary.