Before we see how data sets are actually processed, we will see the mechanisms MVS uses to keep track of the data it stores. Those mechanisms include labels, catalogs, and data set organizations. First we will define a basic term—data set.

A data set is simply a collection of related data that is managed as a unit by MVS. Within a data set, data is organized into smaller units called records, which can be processed individually by application programs. In other words, a data set is the same as a file.

MVS Label Processing

When a data set is stored on disk or tape, MVS normally identifies it with special records called labels. To access a data set identified by labels, you supply information in JCL statements that MVS compares with the label information. That way, you can be sure that the correct data set is processed.

DASD Labels

There are two types of DASD labels: volume label—volume labels and file labels. The following figure is a simplified example of labels on a DASD unit. All DASD volumes must contain a volume label, often called a VOL1 label.

The VOL1 label is always in the same place on a disk volume—the third record of track 0 in cylinder 0. The VOL1 label has two important functions. First, it identifies the volume by providing a volume serial number, or vol-ser. Every DASD volume must have a unique six-character vol-ser.

Second, the VOL1 label contains the disk address of the VTOC. The VTOC, or Volume Table of Contents, is a special file that contains the file labels for the data sets on the volume. These labels, also called Data Set Control Blocks, or DSCBs, have several formats, called Format-1, Format-2, and so on. The first DSCB in the following figure is a Forrnat-4 DSCB—it describes the VTOC itself.

Each Format-1 DSCB in a VTOC describes a data set by supplying the data set's name, DASD location, and other characteristics. The following table gives the rules for forming an MVS data set name and the following table shows you how to avoid some common naming errors. Each group of characters separated by periods in a data set name is called a qualifier. The first qualifier in a name, called the high-level qualifier, often has special significance.

DASD Labels

DASD Labels

Space is allocated to DASD files in areas called extents; each extent consists of one or more adjacent tracks. When a file is initially created, one extent, called the primary extent, is allocated to it.

As additional records are written to the file, however, that extent might not be large enough. So MVS tries to automatically allocate additional extents, called secondary extents, for the file.

Rules for Forming Data Set Names

Rules for Forming Data Set Names

A Format-1 DSCB has room to define three extents for a file—the primary extent and two secondary extents. If the file requires more than three extents, a Format-3 DSCB is created; it contains room for thirteen additional secondary extents. As a result, a file can contain up to sixteen extents: three defined in the Format-1 DSCB, and thirteen defined in the Format-3 DSCB. In the above figure, you can see that a Format-3 DSCB for F1LE-B defines additional extents.

Valid and Invalid Data Set Names

Valid and Invalid Data Set Names

Format-5 DSCBs contain information about free extents, that is, sections of the disk volume that are not allocated to files. Each format-5 DSCB can define up to 26 free extents; if the volume has more than 26 free extents, more than one Format-5 DSCB is used. The Format-5 DSCB in the above figure defines three free extents.

If you are using ISAM files, you should also know about the Format-2 DSCB. This DSCB contains information about the index of an ISAM file. You will learn how indexes work later in this chapter.

For non-VSAM files, VTOC labels contain information that describes the files' characteristics, such as their organization, the size of their blocks and records, and so on. Normally, this information is obtained from JCL specifications when the file is created. For VSAM files, however, the VTOC plays a less important role: VTOC labels simply record the DASD space occupied by VSAM files. The characteristics of those files are stored in catalog entries.

Tape labels

Unlike DASD volumes, labels are optional on tape volumes. Most tapes have standard labels; that is, they have volume and file labels that conform to MVS conventions. Alternatively, a tape can have non

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

IBM Mainframe Topics