COBOL Runtime Error Code – 019 Rewrite error: open mode or access mode

In this post, you’ll learn about the COBOL runtime Error Code 019 and the reason why you are receiving it

COBOL Error Code :

019

Reason for this Error in COBOL

Rewrite error: open mode or access mode wrong (Recoverable) -You are trying to do a REWRITE to a file that has not been opened with the correct access mode for this operation. -Close the file and reopen it in a mode such as I-O, which allows you to do REWRITE operations on that file. As this error implies that your program logic contains a mistake, you might want to close any open files and then execute a STOP RUN. You can then recode your program to eliminate the logic error.