Before your program can use any READ or WRITE statements to process records in a file, it must first open the file with an OPEN statement. An OPEN statement works if the file is available or has been dynamically allocated.
Code CLOSE WITH LOCK so that the file cannot be opened again while the program is running.
related tasks
Reading records from line-sequential files
Adding records to line-sequential files
Closing line-sequential files
Defining and allocating line-sequential files
related references
OPEN statement (Enterprise COBOL Language Reference)
CLOSE statement (Enterprise COBOL Language Reference)