COBOL Manual for TNS and TNS/R Programs

Tape Input and Output
HP COBOL Manual for TNS and TNS/R Programs522555-006
27-8
Labeled Tape Files
If your HP COBOL program must read a FUP-created multitape file, try this:
1. In the SELECT clause of the file-control entry, declare the file to be OPTIONAL.
2. Have the program close and reopen the file when it detects EOF.
3. Have the operator mount the next tape. When the program detects EOF
immediately after an OPEN statement, the last reel has been read.
4. When all tapes have been read, have the operator respond NO to the tape mount
message to signal the actual end of the file.
Labeled Tape Files
A labeled tape file is a tape file that has standard ANSI or IBM labels. If a tape file has
labels of any other type, an HP COBOL program must bypass them, handling the tape
file as unlabeled.
Labeled-tape processing on NonStop systems involves these software elements:
ANSI or IBM standard tape labels (which catalog tape files)
HP COBOL statements and clauses that describe labeled tape files and operate on
them
The TACL command DEFINE (which associates the COBOL file name of a labeled
tape file with its system file name and defines its attributes)
Tape processes (which control tape drives)
$ZSVR, the operating environment server for tape processes
For D-series software RVUs, the tape utility program TAPECOM, which monitors
tape drives; for G-series software RVUs, the MEDIACOM utility is used instead
File-system procedures and functions that support labeled-tape processing