Except where otherwise stated in the general rules below, the terms "reel" and "unit" are equivalent and completely interchangeable in the CLOSE statement. Treatment of sequential mass storage files is logically equivalent to the treatment of a file on tape or analogous sequential media. Treatment of a file contained in a multiple file tape environment is logically equivalent to the treatment of a sequential single-reel/unit file if the file is wholly contained on one reel.
|CLOSE Statement Format
|CLOSE WITH LOCK
|CLOSE WITH NO REWIND
|CLOSE WITH REEL/UNIT
|CLOSE REEL/UNIT FOR REMOVAL
The definitions of the symbols in the table are given below.
All reels/units in the report file prior to the current reel/unit are closed except those reels/units controlled by a prior CLOSE REEL/UNIT statement.
The reel/unit is left in its current position.
If label records are specified for the report file, the labels are processed according to the implementor's standard label convention. The behavior of the CLOSE statement when label records are specified but not present, or when records are not specified but are present, is undefined. Closing operations specified by the implementor are executed. If label records are not specified for the report file, label processing does not take place but other closing operations specified by the implementor are executed.
The current reel or unit is rewound, when applicable, and the reel or unit is logically removed from the run unit; however, the reel or unit can be accessed again, in its proper order of reels or units in the report file, if a CLOSE statement without the REEL or UNIT phrase is subsequently executed for this report file followed by the execution of an OPEN statement for the report file.
The report file is locked and cannot be opened again during this execution of this run unit.
Output Report File (Reel/Unit Media):
The following operations take place:
Output Report File (Non-Reel/Unit Media):
Execution of this statement is considered successful. The file remains in the open mode, and no action takes place except as specified in general rule 4.
The current reel or analogous device is positioned at its physical beginning.
The CLOSE statement is executed as if none of the optional phrases is present.