COBOL Manual for TNS and TNS/R Programs
Tape Input and Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
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.
On a D-series system: Before the HP COBOL process can use the tape, the operator 
must use the Tape Utility Program (TAPECOM) command ACCEPT to approve 
opening the tape. Alternatively, the operator uses the TAPECOM command CLEAR 
NLCHECK to set the system so that processes can open unlabeled tapes without 
approval. Anyone using TAPECOM from a super-group user ID (255,nnn ) can act as 
an operator.
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.










