The CLOSE statement dissociates an opened file from its data set.
|
The CLOSE statement also dissociates from the file all attributes established for it by the implicit or explicit opening process. If desired, new attributes can be specified for the file in a subsequent OPEN statement. However, all attributes explicitly given to the file constant in a DECLARE statement remain in effect.
Closing a file that was previously closed has no effect. A closed file can be reopened. If a file is not closed by a CLOSE statement, it is closed at the termination of the program.