COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
The value of the RETENTION or EXPIRATION attribute is an integer, the number of days before
the file expires.
CAUTION: On a multiple-file volume, the operating environment might overwrite an unexpired
file that follows an expired one; a volume on which the first file has expired is a scratch volume.
Example 273 adds a DEFINE for a labeled tape file with variable-length records whose labels are
to be bypassed. The file is on the tape on the tape drive named $DRIVE.
Example 273 DEFINE for Labeled Tape File With Variable-Length Records and Labels to Be Bypassed
ADD DEFINE =ABC, CLASS TAPE, LABELS BYPASS,&
BLOCKLEN 132, DEVICE $DRIVE
Example 274 adds a DEFINE for a labeled tape file with standard IBM labels and variable-length
records. The file is on the tape whose volume ID is 45329, and it will not expire for 100 days.
Example 274 DEFINE for Labeled Tape File With Variable-Length Records and Standard IBM Labels
ADD DEFINE =DEF, CLASS TAPE, LABELS IBM, RECFORM U,&
BLOCKLEN 132, VOLUME 45329, RETENTION 100
Example 275 adds a DEFINE for a labeled tape file with standard ANSI labels and fixed-length
records. The file is the second file on the tape, and it will not expire for 10 days.
Example 275 DEFINE for Labeled Tape File With Fixed-Length Records and Standard ASCII Labels
ADD DEFINE =DEF, CLASS TAPE, LABELS ANSI, RECFORM F,&
BLOCKLEN 132, RECLEN 132, FILESEQ 2, EXPIRATION 10
Executing HP COBOL Programs That Use Tape Files
During execution of an HP COBOL program that uses tape files, the operating environment software
and the HP COBOL run-time library monitor:
• Tape mounting
• Adherence to rules for using DEFINEs
• For labeled tapes, consistency of labeled-tape information in the HP COBOL program, DEFINE,
and tape label
You can mount tapes yourself or have an operator mount them.
Mount Messages
Mount messages for unlabeled tape files (and labeled tapes files being handled as such) are issued
by an HP COBOL run-time routine; mount messages for labeled tape files are issued by the
labeled-tape processing software.
Table 118 Effect of LABELS Attribute on Mount Messages
Software That Issues Mount MessagesLABELS Attribute Value
HP COBOL run-time routineNone (no LABELS attribute)
HP COBOL run-time routineOMITTED
HP COBOL run-time routineBYPASS
Labeled-tape processing softwareANSI
Labeled-tape processing softwareIBM
Executing HP COBOL Programs That Use Tape Files 853










