COBOL Manual for TNS and TNS/R Programs
Tape Input and Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
27-17
Unlabeled Tape Files
LABELS Attribute (Optional)
The LABELS attribute must have the value OMITTED. With LABELS OMITTED, the
system checks the mounted tape for standard ANSI or IBM labels; if the tape has
them, the system rewinds and unloads the tape.
The LABELS attribute of the DEFINE overrides any LABEL RECORDS clause in your
HP COBOL program.
RECFORM Attribute (Optional)
The value of the RECFORM attribute must correspond to the RECORD CONTAINS
clause in the file description entry in the program.
Note. The 1985 COBOL Standard classifies the LABEL RECORDS clause as obsolete, so
you are advised not to use it.
Table 27-2. Effect of LABELS Attribute and LABEL RECORDS Clause on
Unlabeled Tape File
LABELS Attribute Value
LABEL RECORDS Clause
LABEL RECORDS
STANDARD
LABEL RECORDS
OMITTED
OMITTED HP COBOL sets file status
code to 97
* and execution
proceeds
Execution proceeds
None (no LABELS attribute) Open error Execution proceeds
* File status code 97 means that the statement executed successfully, but the circumstances were not entirely as
expected.
Table 27-3. Correspondence Between RECORD CONTAINS Clause and
RECFORM Attribute Value
Record Length RECORD CONTAINS Clause RECFORM Attribute Value
Variable
(undefined)
RECORD CONTAINS min-length TO
max-length CHARACTERS
U
Fixed RECORD CONTAINS length-fixed
CHARACTERS
F