CLOSE STATEMENT:
When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is as shown below:
CLOSE file-name-1 [, file-name-2] ...
The file should be open when a close statement can be executed. And once a file is closed, it is no longer accessible to the program. It must be opened again if the file is needed consequently. It may be noted that dissimilar the OPEN statement, the nature of the use of the input & output file must not be mentioned in the CLOSE statement.
Illustration:
CLOSE OLD-MASTER, TRANSACTION, NEW-MASTER, PRINT-FILE.
This statement will close all the 4 files - TRANSACTION, OLD-MASTER, PRINT-FILE and the NEW MASTER.