COBOL Runtime Error Code – 002 File not open when access attempted (Rec

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

COBOL Error Code :

002

Reason for this Error in COBOL

File not open when access attempted (Recoverable) -You have tried to access a file without opening it first. -Open the file with the open mode that you need and try the operation again. As this error implies that your program logic contains a mistake, you might want to terminate the run and recode your program.