
 Line Sequential, Relative and Indexed Files)
 Line Sequential, Relative and Indexed Files)
               
 The REEL and UNIT phrases should be specified only for files which have had MULTIPLE REEL or MULTIPLE UNIT specified in their
                        SELECT clause. If your run-time system does not recognize multi-unit files, the statements CLOSE REEL and CLOSE UNIT are "null"
                        statements; that is, they are documentary only. It is important that no other files are open on the device(s) closed by a
                        CLOSE REEL or CLOSE UNIT statement.
 The REEL and UNIT phrases should be specified only for files which have had MULTIPLE REEL or MULTIPLE UNIT specified in their
                        SELECT clause. If your run-time system does not recognize multi-unit files, the statements CLOSE REEL and CLOSE UNIT are "null"
                        statements; that is, they are documentary only. It is important that no other files are open on the device(s) closed by a
                        CLOSE REEL or CLOSE UNIT statement. 
                        		 
                     		
                      The statements CLOSE REEL WITH LOCK and CLOSE UNIT WITH LOCK are treated as equivalent to CLOSE REEL FOR REMOVAL.
 The statements CLOSE REEL WITH LOCK and CLOSE UNIT WITH LOCK are treated as equivalent to CLOSE REEL FOR REMOVAL. 
                        		
                     
 The DISP option is applicable only to tape files.
 The DISP option is applicable only to tape files. 
                     		
                     It is documentary only.
 If a file is in the open mode when a STOP RUN statement is executed, the fileis closed. If a file has been opened in a called
                     program and not closed in that program prior to the execution of a CANCEL statement for the program, that file is closed.
 If a file is in the open mode when a STOP RUN statement is executed, the fileis closed. If a file has been opened in a called
                     program and not closed in that program prior to the execution of a CANCEL statement for the program, that file is closed.
                     
                     	 
                   Following the successful execution of a CLOSE statement, all record or file locks held by the run unit on the closed file
                     are released.
 Following the successful execution of a CLOSE statement, all record or file locks held by the run unit on the closed file
                     are released. 
                     	 
                  | CLOSE Statement Format | File Category | |||
|---|---|---|---|---|
| Non-Reel/Unit | Record Sequential Single-Reel/Unit | Record Sequential Multi-Reel/Unit | Non-record Sequential Single/ Multi-Reel/Unit | |
| CLOSE | C | C, G | A, C, G | C | 
| CLOSE WITH LOCK | C, E | C, E, G | A, C, E, G | C, E | 
| CLOSE WITH NO REWIND record sequential only |  C, H | B, C | A, B, C | X | 
| CLOSE REEL/UNIT record sequential only |  F |  F, G | F, G | X | 
| CLOSE REEL/UNIT FOR REMOVAL record sequential only |  F |  D, F, G | D, F , G | X | 
| CLOSE REEL/UNIT WITH NO REWIND record sequential only | X | X | F, B | X | 
The definitions of the symbols in the table are given below. Where the definition depends on whether the file is an input, output or input-output file, alternate definitions are given; otherwise, a definition applies to input, output, and input-output files.
| A. Previous Reels/Units Unaffected | |
| 
 | |
| B. 
                                       				  No Rewind of Current Reel The current reel/unit is left in its current position. | |
| C. Close File | |
| 
 | |
| D. Reel/Unit Removal | |
| The reel or unit can be accessed again, in the proper order of reels or units in the file, if a CLOSE statement without the REEL or UNIT phrase has previously been executed for this file followed by the execution of an OPEN statement for the file. | |
| E. 
                                       				  File Lock This file cannot be opened again during this execution of this run unit. | |
| F. Close Reel/Unit | |
| 
 | |
| G. 
                                       				  Rewind The current reel or analogous device is positioned at its physical beginning. | |
| H. 
                                       				  Optional Phrases Ignored 
 | |
| X. 
                                       				  Illegal This is an illegal combination of a CLOSE option and a file category. The results at object time are undefined. | |
 (This option has no connection with the record or file locking used when sharing files.)
 (This option has no connection with the record or file locking used when sharing files.) 
                        		
                     
 
                        		   other than a DELETE FILE statement
 other than a DELETE FILE statement 
                           		   
                        		
                     
can be executed that references that file, either explicitly or implicitly, unless an intervening OPEN statement for that file is executed.