Use the CLOSE statement to disconnect your program from a line-sequential file. If you try to close a file that is already closed, you will get a logic error.
If you do not close a line-sequential file, the file is automatically closed for you under the following conditions:
You can change the location where the program resumes (after a condition is handled) by moving the resume cursor with the Language Environment CEEMRCR callable service or using HLL language constructs such as a C longjmp call.
File status codes are set when these implicit CLOSE operations are performed, but EXCEPTION/ERROR declaratives are not invoked.
related tasks
Opening line-sequential files
Reading records from line-sequential files
Adding records to line-sequential files
Defining and allocating line-sequential files
related references
CLOSE statement (Enterprise COBOL Language Reference)