Tape Formats

This document describes the basic differences in labeled & non-labeled tape formats.

Overview

There are three major tape formats used in writing tapes. The intention of this document is to give a basic understanding of the differences between them as well as the advantages and disadvantages associated with each.

IBM & ANSI Standard Labels

These two formats are very much alike in regard to how data is physically laid out on the tape. There are minor differences in terms of the number of bytes allowed in certain fields within the labels and the number of "user" labels or headers allowed for each file on the tape but that's about it. For our purposes here, we can treat both label types as the same.

When Standard labels are used, the operating system writing the data will first write what's known as the VOL1 record. This record contains the volume serial number or volume serial (VSN or VOLSER) which uniquely identifies the volume. Next, any (optional) user volume labels (UVL1-9) are written. Following the user volume labels are the header 1 (HDR1) and header 2 (HDR2) labels. These labels contain the data control information needed to read the data as well other information regarding the data. Next comes optional user header labels (UHL) which may be unlimited. Next comes the actual data followed by end-of-file 1 (EOF1) & end-of-file 2 (EOF2) labels which more or less mirror the information contained in the HDR1 & HDR2 labels with the exception of appending such things as the number of blocks written (block count). Last comes optional user trailer labels (UTL).

In cases where a file spans multiple tapes, end-of-volume 1 (EOV1) & end-of-volume 2 (EOV2) labels are used in place of EOF labels. EOV labels also mirror that information of HDR1 & HDR2. In addition, it contains the VOLSER or VSN of the next volume in the set.


 HDR1/ content: Label identifier; label number; data set identifier (name);
 EOF1/          data set serial number (VSN); Volume sequence number;
 EOV1           data set sequence number; GDG number; version number;
                creation date; expiration date; dataset security (pwd or not);
                block count; system code (OS used to create the tape).

 HDR2 content: Label identifier; label number; record format; blocksize;
 EOF2/         record length; tape density; dataset position; job/job-step
 EOV2          identification; Tape recording technique;

BOT/EOT = beginning/end of tape
     TM = tape mark - used to signify end of data. Double TM used to signify
          logical end of tape.

Example 1: IBM standard labels (Single file, single tape)




                BOT
                ----------------
                |    VOL1       | (Volume Serial Number or VSN)
                |---------------|
                |    UVL1-9     | (Optional user volume labels)
                |---------------|
                |    HDR1       | 
                |---------------|
                |    HDR2       | 
                |---------------|
                |    HDR3-9     | (Optional)
                |---------------|
                |    UHLn       | (Optional & Unlimited)
                |---------------|
                |      TM       |
                |---------------|
                |               |
                |               |
                |     DATA      |
                |               |
                |               |
                \/\/\/\/\/\/\/\/|
 
                \/\/\/\/\/\/\/\/|
                |               |
                |               |
                |---------------|
                |      TM       |
                |---------------|
                |     EOF1      |
                |---------------|
                |     EOF2      | 
                |---------------|
                |     EOF3-9    | (Optional)
                |---------------|
                |     UTLn      | (Optional user trailer labels)
                |---------------|
                |      TM       |
                |---------------|
                |      TM       |
                |---------------|
                |               |
                |               |
                -----------------
                EOT


Example 2: IBM standard labels (Single file, multi-volume)

                BOT
                 ---------------
        Volume1 |    VOL1       | (Volume Serial Number or VSN)
                |---------------|
                |    UVL1-9)    | (Optional user labels)
                |---------------|
                |    HDR1       | 
                |---------------|
                |    HDR2       |
                |---------------|
                |    HDR3-9     | (Optional)
                |---------------|
                |    UHLn       | (Optional & Unlimited)
                |---------------|
                |      TM       |
                |---------------|
                |               |
                |               |
                |     DATA      |
                |               |
                |               |
                \/\/\/\/\/\/\/\/|
 
                \/\/\/\/\/\/\/\/|
                |               |
                |               |
                |---------------|
                |      TM       | 
                |---------------|        
                |     EOV1      | Note that EOV labels are used as
                |---------------|       opposed to EOF labels
                |     EOV2      |
                |---------------|
                |      TM       |
                |---------------|
                |      TM       |
                 ---------------
                EOT
 
                BOT
                 ---------------
        Volume2 |    VOL1       | (Volume Serial Number or VSN)
                |---------------|
                |    UVL1-9)    | (Optional user labels)
                |---------------|
                |    HDR1       | 
                |---------------|
                |    HDR2       |
                |---------------|
                |    HDR3-9     | (Optional)
                |---------------|
                |    UHLn       | (Optional & Unlimited)
                |---------------|
                |      TM       |
                |---------------|
                |               |
                |               |
                |     DATA      |
                |               |
                |               |
                \/\/\/\/\/\/\/\/|
 
                \/\/\/\/\/\/\/\/|
                |               |
                |               |
                |---------------|
                |      TM       |
                |---------------|
                |     EOF1      |
                |---------------|
                |     EOF2      |
                |---------------|
                |     EOF3-9    | (Optional)
                |---------------|
                |      TM       |
                |---------------|
                |      TM       |
                |---------------|
                |               |
                |               |
                -----------------
                EOT

ANSI Specific Requirements

IOS/ANSI/FIPS labels are similar to IBM standard labels. The principal differences are:

  • A maximum of 9 user volume labels can appear in the beginning-of-volume group.
  • An unlimited number of user labels may be used
  • The formats of header/trailer labels slightly different.
  • HDR2/EOV2/EOF2 labels are optional
  • A maximum of 9 EOF/EOV labels can appear in the file section.

Labels must be recorded using the subset of /ASCII characters allowed by ISO/ANSI/FIPS Standards. These characters are:

  • Uppercase alphabetic
  • Numeric
  • Space

IBM non-label

The main reason for using non-labeled tapes in the past was to allow data written by one system to be transported and read onto another type of system. With the advancement of networking technology and the standardization of protocols used to communicate with other type systems, the need for such data interchange has become obsolete in most cases.

The following illustration shows the physical layout of a non-labeled tape.

                BOT
                ----------------
                |               |
                |               |
                |     DATA      |
                |               |
                |               |
                |---------------|
                |      TM       |
                |---------------|
                |      TM       |
                |---------------|
                \/\/\/\/\/\/\/\/|
 
                \/\/\/\/\/\/\/\/|
                |               |
                |               |
                -----------------
                EOT

RAW

The term RAW is used to describe those tapes which do not fit the criteria used for IBM or ANSI labeled tapes or IBM non-labeled tapes. While the physical layout of the tape is very much the same as an IBM non-labeled tape, the system or application used to write the tape recognizes/understands only data "blocks" and knows nothing of logical records or record formats.

Labels vs non-labels/RAW

Labels

Advantages

  • The operating system has a means of determining if the correct tape has been mount via the "VOL1" record containing a VOLSER.
  • All information needed to read the data is self-contained within each of the file header & trailer labels on the tape.
  • Multi-volume files are more easily supported.

Disadvantages

  • The remote host must support the reading of standard labels. This usually means a somewhat costly application will be needed in a non-mainframe type shop.

Non-label

Advantages

  • Can be easily portable to other operating systems in most cases.

Disadvantages

  • The operating system has no means of verifying the correct tape has been mounted as the tape lacks a VOL1 record.
  • A record needs to be kept somewhere with the data control information for each file on the tape.