COBOL · File status code

File Status 38

What does File Status 38 mean in COBOL?

The program tried to OPEN a file that was previously closed WITH LOCK, which prevents it from being reopened for the rest of the run.

File Status 38IBM Enterprise COBOL · Micro Focus · GnuCOBOL

Condition

The program tried to OPEN a file that was previously closed WITH LOCK, which prevents it from being reopened for the rest of the run.

Fix

Remove the WITH LOCK phrase from the earlier CLOSE if the file needs to be reopened later in the same run, or restructure the program so the file is only closed once, at the end.

Pending source verification. Not yet checked against official documentation.

Related file status code