Opening line-sequential files

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 references  
OPEN statement (Enterprise COBOL for z/OS Language Reference)  
CLOSE statement (Enterprise COBOL for z/OS Language Reference)