You may execute it only for a file in an open mode. After successful execution of the CLOSE statement without the REEL/UNIT phrase:
Format 1 (Sequential Files Format) *------------------------------------------------------* V + ->->--CLOSE file-name-1-*------------------------------------------*-----><- **-*-REEL-*----*--------------------*--*---* + *-UNIT-* *-----*--REMOVAL-----* + + *-FOR-* + *-*------*-----*-NO REWIND-*----------* *-WITH-* *-LOCK------*
File-name-1 designates the file upon which the CLOSE statement is to operate. If you specify more than one file-name, the files need not have the same organization or access.
File-name-1 must not be a sort or merge file.
Specify the REEL/UNIT phrases for multivolume or single volume tape files.
The system always rewinds and unloads the tape when you specify REEL/UNIT on the CLOSE statement.
REEL and UNIT are interchangeable.
The FOR REMOVAL phrase is applicable only to tape files. The current volume is rewound and unloaded. The system is notified that the volume is logically removed from the run unit. However, the volume can be accessed again after a CLOSE operation without the REEL/UNIT phrase, and an OPEN operation for this file.
The system always rewinds and unloads the tape when you specify REEL/UNIT on the CLOSE statement.
The WITH NO REWIND phrase is applicable only to tape files.
The current volume is left in its present position. The reel is not rewound.
The system always rewinds and unloads the tape when you specify REEL/UNIT on the CLOSE statement.
The WITH LOCK phrase ensures that the file cannot be reopened during this processing of the program. The record area associated with the file-name is no longer available after a successful CLOSE operation.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.