COBOL Manual for TNS/E Programs (H06.03+)

Tape Input and Output
HP COBOL Manual for TNS/E Programs520347-003
27-16
Unlabeled Tape Files
Unlabeled Tape Files
The attributes of unlabeled tape files are:
CLASS Attribute (Required)
DEVICE Attribute (Required)
BLOCKLEN Attribute (Conditional)
LABELS Attribute (Optional)
RECFORM Attribute (Optional)
RETENTION or EXPIRATION Attribute (Optional)
CLASS Attribute (Required)
The value of the CLASS attribute must be TAPE. The CLASS attribute must be the first
attribute in the ADD DEFINE command, because it determines what other attributes
the DEFINE can have and clears any existing attribute settings, including any that
precede it in the ADD DEFINE command.
DEVICE Attribute (Required)
The value of the DEVICE attribute must be the system file name of a tape drive.
BLOCKLEN Attribute (Conditional)
The BLOCKLEN attribute is required if the tape file has fixed-length records; that is, if
the RECORD CONTAINS clause in the file description entry is of the form
RECORD CONTAINS length-fixed CHARACTERS
the value of the BLOCKLEN attribute must be the same as:
The block size that the tape label specifies
The value of blk-2 in the BLOCK CONTAINS clause (if the tape file description
entry has one)
If the tape file has variable-length records, omit the BLOCKLEN attribute from the
DEFINE. HP COBOL programs cannot process blocked variable-length records.