COBOL · File status code

File Status 42

What does File Status 42 mean in COBOL?

The program issued CLOSE against a file that is not currently open.

File Status 42IBM Enterprise COBOL · Micro Focus · GnuCOBOL

Condition

The program issued CLOSE against a file that is not currently open.

Fix

Check for a duplicate CLOSE statement, or a CLOSE inside error-handling logic that runs even when OPEN never succeeded.

Pending source verification. Not yet checked against official documentation.

Related file status code