Resolution:
Close the file with a new access mode which is compatible with that type of file, or execute a STOP RUN statement and recode your program.