|
Figure 1 shows the format of HDR2, EOV2,
and EOF2. The shaded areas represent fields that the operating system
writes in the label, but are not used or verified during processing.
The contents and processing of each field of the label are described,
as are differences between ISO/ANSI labels and IBM labels.
If the labels are produced by MVS, they are treated like IBM standard
header 2 and trailer 2 labels. If the labels are produced by another
system, the "Reserved for Operating System" and "Record Format" fields are not used.
Figure 1. Format of ISO/ANSI header 2 and trailer 2 labels
1—Label Identifier (3 bytes) - Contents: Three characters that identify the label are
as follows:
-
- HDR
- Header label (at the beginning of a data set)
- EOV
- Trailer label (at the end of a tape volume, when the data set
continues on another volume)
- EOF
- Trailer label (at the end of a data set).
- Processing: The system checks this field to verify that
the record is an ISO/ANSI data set label.
For input data sets,
the system checks the label identifier to determine whether data set
processing should continue. When the system finds an EOV label, it
performs volume switching. When the system finds an EOF label, it
passes control to the user's end-of-data routine or continues processing
with a concatenated data set.
If the DD statement specifies
OPTCD=B for an input data set, the system accepts either EOV or EOF
as the trailer label identifier, and the identifier is not used to
determine whether a volume switch is necessary. If more volumes are
available, the system performs the switching. If no volumes are available,
the system passes control to the user's end-of-data routine or continues
processing with a concatenated data set.
When creating trailer
labels, the EOV routine writes EOV in this field, and the close routine
writes EOF.
2—Label Number (1 byte) - Contents: The relative position of this label within a
set of labels of the same type; it is always 2 for data set label
2.
- Processing: Verified and written in conjunction with Field
1 to identify this label as HDR2, EOV2, or EOF2.
3—Record Format (1 byte) - Contents: An alphabetic character that indicates the format
of the records in the associated data set:
-
- F
- Fixed length
- D
- Variable length
- S
- Spanned
Note: RECFM=U (undefined length) is accepted for input from a Version 1 tape. If specified for input or output for Version
3 or Version 4 tapes, the label validation exit is entered.
For detailed information about record formats, see z/OS DFSMS Using Data Sets.
- Processing: For input, the open routine obtains the record
format from this label, converts it to a bit code, and records it
in the JFCB (if the JFCB field is 0). Then the record format in the
JFCB is recorded in the DCB (if the DCB field is 0). Note that this
is a merging process in which existing specifications in the JFCB
and DCB cannot be overridden.
Record format will not be accepted
from the label if the block attribute (in Field 6) is not applicable
to MVS; in this case, record format must be specified in JCL or in
the DCB.
When creating labels, the system's OPEN and EOV routines
do a reverse merge. The record format in the DCB overrides the record
format in the JFCB, and the updated JFCB provides the information
for the label.
This merging process is explained and illustrated
in Figure 1.
4—Block Length (5 bytes) - Contents: A number from 18 to 2 048 for Version 3
or from 18 to 32 760 for Version 4 indicates the block length
(including buffer offset and padding) in bytes.
Note: The 2 048-byte
limit on block length is part of the Version 3 standard. Larger blocks
(up to 9 999 bytes for format D and format S records and 32 760
bytes for format F records) may be specified with the agreement of
the interchange parties. However, for tapes with Version 3 labels,
exceeding the 2 048-byte limit causes the label validation exit
to be entered. The maximum block length for Version 4 is 32 760
bytes.
The system can determine the optimum block size when
creating tape data sets. For more information, see z/OS DFSMS Using Data Sets.
Interpretation of the number depends on the associated
record format in Field 3, as follows: -
- Format F
- Maximum block length. If the block attribute in field 6 contains
a blank, this field is also the minimum block length.
- Format D
- Maximum block length that includes the 4-byte length indicator
in the records and the optional block prefix.
- Format S
- Maximum block length that including the optional block prefix,
plus one or more pairs of 5-byte segment control words and segments.
- Processing: The number in the label is converted to binary
and merged with appropriate fields in the JFCB and in either the DCB
or DCBE. The merging process is the same as that for the record format
code in field 3 of this label.
5—Record Length (5 bytes) - Contents: A number that indicates the record length in
bytes. Interpretation of the number depends on the associated record
format in Field 3, as follows:
-
- Format F
- Actual record length
- Format D
- Maximum record length that includes the 4-byte length indicator
in the records.
- Format S
- Maximum record length that excludes all the 5-byte segment control
words that describe the record. If the record length is larger than
99 999, this field is 0.
- Processing: The number in the label is converted to binary
and merged with the appropriate fields in the JFCB and DCB. The merging
process is the same as for the record format code in Field 3 of this
label.
6—Reserved for Operating System (35 bytes) - Contents: If the label is produced by this operating system
(the system code in the first header label is IBMZLA), the content
and format of this field are similar to the content and format of
the ten fields that follow the record length field in an IBM standard
label. If the label is produced by another system, the content and
format of this field are optional, and the field is not processed
by the operating system. The fields produced by the operating system
are:
- Tape Density (1 byte)
- Contents: A code indicating the recording density of the
tape; the code is equivalent to the DEN parameter value on the DD
statement (for the DEN parameter values, refer to Tape characteristics). If DCB=DEN was not specified
in JCL, this field is set to blanks.
- Processing: If DCB=DEN was not specified in JCL, this
data is merged in the JFCB for input. When the system creates labels,
the information for this field is obtained from the JFCB.
- Data Set Position (1 byte)
- Contents: A code indicating a volume switch is as follows:
-
- 0
- No volume switch has occurred.
- 1
- A volume switch previously occurred.
- Processing: Not used or verified. When creating labels,
the open routine writes 0 in this field, and the EOV routine writes
a 1. The close routine determines which code to write by comparing
the first volume serial number in the JFCB to the number in the UCB.
The close routine writes 0 if the numbers are equal, and 1 if they
are not equal.
- Job/Job Step Identification (17 bytes)
- Contents: Identification of the job and job step that
created the data set. The first 8 bytes contain the name of the job;
the ninth byte is a slash (/), and the last 8 bytes contain the name
of the job step.
- Processing: Not used or verified. When the system creates
labels, it sets this field as described above.
- Tape Recording Technique (2 bytes)
- Contents: Recorded as blanks for all tapes except 7-track
tapes. A 9-track tape can only be recorded in odd parity with no translation.
- Processing: Not used or verified.
- Control Characters (1 byte)
- Contents: A code indicating whether a control character
set was used to create the data set, and the type of control characters
used:
-
- A
- Contains Version 3 or Version 4 control characters.
- ␢
- Contains no control characters.
- Processing: The specification in the label is converted
to a bit code and merged with the Record Format field in the JFCB
if ANSI carriage control was not specified as part of DCB=RECFM in
JCL.
- Buffer Alignment Block (1 byte)
- Contents: Reserved for future use; recorded as blanks
- Processing: Not used or verified. When creating labels,
the system writes blanks in this field.
- Block Attribute (1 byte)
- Contents: A code indicating the block attribute used to
create the data set:
-
- B
- Blocked records
- ␢
- Records not blocked.
- Processing: The specification in the label is converted
to a bit code and merged with the record format field in the JFCB.
The merging process is the same as for the record format code in Field
3 of this label.
- Coded Character Set ID (CCSID) (5
bytes)
- Contents: A code indicating the CCSID used to create the
user data on the Version 4 tape or blank.
- Processing: The CCSID used to convert data to and from
the tape. If blank, the data is written in ASCII characters. See Equivalent ASCII and EBCDIC codes, and CCSID conversion.
- Reserved (6 bytes)
- Contents: Recorded as blanks.
- Processing: Reserved for definition by IBM. Currently
not used or verified.
7—Buffer Offset (2 bytes) - Contents: The length of the block prefix (from 0 to 99).
- Processing: Used to determine the length of an optional
prefix that may be a part of a physical block on tape. The version
of the prefix for variable and spanned record formats is known as
a block descriptor word (BDW). A BDW is always 4 bytes long and contains
the block length of the physical record it describes, including the
BDW. The BUFOFF=L operand informs the system that the prefix is an
MVS BDW. The prefix is not made available as part of the data read
into storage by the queued access method. For more information about
BDWs, see z/OS DFSMS Using Data Sets.
- Difference from IBM Field: This field is not present in
IBM standard labels.
8—Reserved for Future Standardization (28 bytes) - Contents: Reserved for possible future use; recorded as
blanks. The blanks are translated to ASCII space characters on output.
- Processing: Not used or verified. When creating labels,
the system writes blanks in this field.
|