COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-37
CLOSE
CLOSE
CLOSE terminates processing of one or more open files or reels of tape. An optional
LOCK phrase prevents the program from reopening the file (unless the file is
dynamically assignable—see #DYNAMIC).
If a file is closed but not locked, the only I-O operation the process can perform on that
file is an open operation. If the file is closed and locked, the process cannot perform
any I-O operation on the file.
CLOSE has these formats:
•
CLOSE for Sequential and Line Sequential Files
•
CLOSE for Relative, Indexed, and Queue Files
CLOSE for Sequential and Line Sequential Files
Throughout this topic, “sequential file” means both sequential and line sequential files
unless otherwise noted.
file-name
is the name of the sequential 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.
file-info
file-name
CLOSE
file-info
VST138.vsd
UNIT
REEL FOR REMOVAL
WITH LOCK
NO REWIND
VST139.vsd