Using UNITNO and OMITTEDEOF for Unlabeled Tape Files

By default, any tapes created by an A Series system have ANSI-standard tape labels. These tape labels store identification information for the tape. However, you might have occasion at some time to use a tape on an A Series system that was created by a different type of computer system. If the different computer system did not create an ANSI-standard tape label, you must design your program to read the tape as an unlabeled tape. You can also use this technique to enable a program to read a tape whose label has become corrupted.

When a process attempts to open an unlabeled tape, the process typically becomes suspended until an operator enters a UL (Unlabeled) system command. This command specifies the tape drive to use for the file. You can prevent the need for the operator to enter this command. However, you must use a different technique than was previously described for labeled tapes. The SERIALNO attribute has no meaning for unlabeled tapes.

Instead, if you know the physical unit number of the drive where the correct tape will be mounted, you can design the program to assign the physical unit number of that tape drive to the UNITNO file attribute. A file open operation then opens any tape that happens to be on the specified tape drive. This method should not be used unless you can ensure that the correct tape will be mounted on the tape drive when the program runs. Note also that access to unlabeled tapes and to the UNITNO file attribute are restricted on systems running Security Services for ClearPath MCP security enhancement software when the security options UnLabeledTapes and NonPrivUnitNo have the values NOTOK; refer to the Security Operations Guide for details.

A process can also be suspended when it reaches the end of an unlabeled tape file. This happens because, depending on the circumstances, a tape mark can indicate the end of the file or simply the end of a reel. If the LABEL file attribute value is OMITTED, the tape mark is interpreted to mean that the file continues on another tape reel. The process becomes suspended until the operator enters a UL command (to specify where the next reel is located) or an FR (Final Reel) system command.

If you know in advance that the unlabeled tape file will be confined to a single reel, you can prevent the process from suspending at the end of the file. To do this, you must declare the file with a LABEL value of OMITTEDEOF. In this case, when the process reads to the end of the file, the system returns an end-of-file condition on the read operation. The process can check the result of the read operation and take appropriate action. This method saves the operator the trouble of entering the FR command.