COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division Verbs
HP COBOL Manual for TNS/E Programs—520347-003
9-38
CLOSE for Relative, Indexed, and Queue Files
•
COBOL and FUP Closing Procedures Are Incompatible (Multiple-Tape File)
When the run-time routine closes a nonfinal reel of a multiple-tape file, it writes an
end-of-file mark, a trash record, and an end-of-file mark. When the File Utility
Program (FUP) closes a multiple-reel tape file, it writes only the two consecutive
end-of-file marks. Because these closing procedures differ, you must not use FUP
to copy tapes written by and for COBOL programs. Instead, write a simple COBOL
program to copy such tapes.
•
Process Pairs
When the run unit is executing as a process pair, the execution of a CLOSE file-
name also executes an implied statement of this form:
CHECKPOINT FILE file-name
•
Repositioning a Sequential File to Its Beginning
Although you can reposition a sequential file to its beginning by closing it and
reopening it, you can do it faster with the routine
COBOL_REWIND_SEQUENTIAL_. For information on these routines, see
COBOL_REWIND_SEQUENTIAL_.
CLOSE for Relative, Indexed, and Queue Files
file-name
is the name of the relative,indexed, or queue file to be closed.
When more than one file-name appears, the files can have different
organization and access modes and the optional phrases following one file-
name are independent of those following any other file-name.
LOCK
means the file associated with file-name cannot be opened again during the
current run. If the file is dynamically assignable, the LOCK phrase has no effect
(see #DYNAMIC).
See these usage considerations in CLOSE for Sequential and Line Sequential Files:
•
Effects of CLOSE
•
File-Status Data Item
•
Closing a File Open Under More Than One Name
file-name
CLOSE
WITH LOCK
VST140.vsd










