You have violated one of the general rules of COBOL programming.
Close any files which might be open, execute a STOP RUN statement and then edit your program to avoid such illegal operations.