COBOL Runtime Error Code – 143 Rewrite/delete in sequential mode not pr

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

COBOL Error Code :

143

Reason for this Error in COBOL

Rewrite/delete in sequential mode not preceded by successful read (Recoverable) -You have failed to do a successful read on a sequentially accessed file trying a REWRITE or DELETE on some of the information contained in that file. -If the previous read was successful then perform a read on the relevant file before you retry the unsuccessful REWRITE or DELETE operation. If the previous read was also unsuccessful close the file, execute a STOP RUN statement and then recode your program before you next run it.