IBM Standard File Labels on Tape

IBM® standard file labels are 80 bytes long.

Each file has a header and a trailer label of the same format. This allows a tape to be read forward and backward.

The first four characters of a label identify its type. These characters are for:
  • Header labels:
    HDR1 and HDR2 –
    At the beginning of a file.
  • Trailer labels:
    EOF1 and EOF2 –
    At the end of a file.
    EOV1 and EOV2 –
    At the end of a volume and not the end of a file.

Data Set 2 Labels

To facilitate migration to an MVS™ environment, labeled output tapes that are created via DTFMT or DTFPH contain standard IBM data set label 2 records (HDR2, EOF2, EOV2). The purpose of these labels is to record characteristics of the file, such as block size, record size, record format. These labels also contain information about the recording technique used to create the file, the unit on which the data was written, and the job and program (taken from the COMREG) that were used to create the file. In an MVS environment, the file can thus be used without any data control block (DCB) or data definition (DD) specification.

Data set 2 labels are also created for standard labeled work files. On input, these labels are skipped.

Additional labels (HDR3 through HDR8, if present) are ignored by z/VSE.

Table 1 through Table 4 show IBM standard file labels for tapes.

Table 1. First IBM Standard Tape File Label for EBCDIC Code
Displ. Length Content
00 04 Label ID: HDR1, EOF1, or EOV1.
04 11 File ID. From TLBL.
15 06 Volume serial number of first volume of the file.
1B 04 Volume sequence number within the file.
1F 04 File sequence number on the volume.
23 04 Version number of the file.
27 02 Subversion number.
29 06 Creation date: cyyddd.
2F 06 Expiration date: cyyddd.
35 01 Reserved.
36 06 Number of blocks written. Used only in trailer labels.
37 0D System code: IBMDOSVS.
49 01 Bit 0 = 1: expiration date specified by retention period.
4A 02 Reserved.
4C 04 High-order block count.
Table 2. First IBM Standard Tape File Label for ASCII Code
Displ. Length Content
00 04 Label ID: HDR1, EOF1, or EOV1.
04 11 File ID. From TLBL.
15 06 Volume serial number of first volume of the file.
1B 04 Volume sequence number within the file.
1F 04 File sequence number within volume.
23 04 Version number of the file.
27 02 Subversion number.
29 06 Creation date: cyyddd.
2F 06 Expiration date: cyyddd.
35 01 Data set security (accessibility character).
36 06 Number of blocks written. Used only in trailer labels.
3C 0D System code: IBMZLB, followed by two blanks.
49 07 Reserved.
Table 3. Second IBM Standard Tape File Label for ASCII Code
Displ. Length Content
00 04 Label ID: HDR2, EOF2, or EOV2.
04 01 Record format:
  • C'F' for fixed.
  • C'D' for variable.
  • C'S' for all other cases.
05 05 Block length.
0A 05 Record length.
0F 23 Reserved.
32 02 Buffer-offset length.
34 1C Reserved.
Table 4. Second IBM Standard Tape File Label for EBCDIC Code
Displ. Length Content
00 04 Label ID: HDR2, EOF2, or EOV2.
04 01 Record format:
  • F for fixed-length records
  • V for variable-length and spanned records
  • U for undefined records (default for DTFPH)
05 05 Block length, unpacked decimal (for DTFPH, a maximum block length of 32,767 is assumed).
0A 05 Record length, unpacked decimal.
0F 01 Tape density:
  • For 7-track tapes:
    • 0 200 bpi
    • 1 556 bpi
    • 2 800 bpi
  • For 9-track tapes:
    • 2 800 bpi nrzi
    • 3 1600 bpi pe
    • 4 6250 bpi gcr
  • For a 3480 tape this field is blank.
10 01 Data set position:
  • 0 No volume switch occurred.
  • 1 A volume switch previously occurred.

Open sets the field to 0 when it is the first volume, that is, whenever the volume serial number and the file serial number are the same; otherwise it sets the field to 1.

For end of volume (EOV) and close (EOF), the field is set to 0 or 1 in the same way as for Open.

11 17 Job/job step identification:
Bytes 1 to 8:  Job name (taken from the COMREG).
Byte 9:  Set to '/'.
Bytes 10 to 17:  Program name (taken from the COMREG).

For tape files that have been extended with TLBL DISP=OLD or DISP=MOD, this field in the EOV2/EOF2 labels contain the information that is related to the job and job step that extended the file.

22 02 Tape recording technique:
  • For 7-track tapes it is set to (␢ represents a blank):
    • T␢ Odd parity with translation.
    • C␢ Odd parity with conversion.
    • E␢ Even parity with no translation.
    • ET Even parity with translation.
    • ␢␢ Odd parity with no translation and no conversion.
  • For units with the Improved Data Recording feature (IDRC), the field is set to (&blank represents a blank):
    • P␢ Data is compacted using IDRC feature.
    • ␢␢ Data is non-compacted. On some data sets this field might contain NP to indicate non-compacted data.
  • For all other tape units this field is set to blanks.
24 01 Printer control character, always set to blanks.
25 01 Reserved for future use, set to blanks.
26 01 Block attribute.
  • B for fixed-length and variable-length blocked records (RECFORM=FIXBLK or VARBLK).
  • S for spanned variable-length unblocked records (RECFORM=SPNUNB).
  • R for spanned variable-length blocked records (RECFORM=SPNBLK).
  • '' In all other cases.
27 02 Reserved, set to blanks.
29 06 For the 3590 or 3592, bytes 42-47 contain the device serial number (taken from sense byte 27-29).
2A 05 This field is set as follows:
  • For the 3420, the first half byte of byte 43 contains the model number (taken from bits 4 - 7 of sense byte 17); the second half byte of byte 43 and bytes 44 - 47 contain the last 4 digits of the serial number of the creating tape unit (taken from sense bytes 15 and 16 as a 16-bit unsigned binary number and stored as zoned decimal equivalent).
  • For the 3480 and 3490, bytes 43 - 46 contain the last 4 digits of the serial number of the control unit (taken from sense bytes 28 and 29); byte 47 contains the device address (taken from bits 4 - 7 of sense byte 30).
  • For the 3424, bytes 43 - 47 contain the device serial number (taken from sense bytes 27 - 29; bits 0 - 3 of sense byte 27 are ignored).
2F 01 Checkpoint data set identifier, set to blanks.
30 20 Reserved, set to blanks.