COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Table 114 Correspondence Between RECORD CONTAINS Clause and RECFORM Attribute Value
RECFORM Attribute ValueRECORD CONTAINS ClauseRecord Length
URECORD CONTAINS min-length
TO max-length CHARACTERS
Variable (undefined)
FRECORD CONTAINS length-fixed
CHARACTERS
Fixed
RETENTION or EXPIRATION Attribute (Optional)
Use the RETENTION or EXPIRATION attribute when you want to save a file for any period of time,
even part of a day; otherwise, the file expires as soon as you write it, and the system might overwrite
the file.
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 system might overwrite an unexpired file that follows
an expired one; a volume on which the first file has expired is a scratch volume.
Example 271 adds a DEFINE for an unlabeled tape file with variable-length records. The file is on
the tape on the tape drive named $DRIVE.
Example 271 DEFINE for Unlabeled Tape File With Variable-Length Records
ADD DEFINE =ABC, CLASS TAPE, DEVICE $DRIVE
Example 272 adds a DEFINE for an unlabeled tape file with fixed-length records. The file is on
the tape on the tape drive named $DRIVE, and it will not expire for five days.
Example 272 DEFINE for Unlabeled Tape File With Fixed-Length Records
ADD DEFINE =DEF, CLASS TAPE, DEVICE $DRIVE,&
BLOCKLEN 132, RETENTION 5
Labeled Tape Files
The attributes of labeled tape files are:
• CLASS Attribute (Required)
• LABELS Attribute (Required)
• RECFORM Attribute (Conditional)
• BLOCKLEN Attribute (Conditional)
• RECLEN Attribute (Conditional)
• DEVICE Attribute (Conditional)
• FILESEQ Attribute (Conditional)
• USE Attribute (Optional)
• VOLUME Attribute (Optional)
• RETENTION or EXPIRATION Attribute (Optional)
Adding DEFINEs for Tape Files 849










