COBOL · File status code

File Status 18

What does File Status 18 mean in COBOL?

The physical file ended before a complete record could be read, or the file was opened in a mode inconsistent with its actual organization.

File Status 18IBM Enterprise COBOL · Micro Focus · GnuCOBOL

Condition

The physical file ended before a complete record could be read, or the file was opened in a mode inconsistent with its actual organization.

Fix

Verify the file's actual organization (line sequential vs. fixed/variable block) matches the SELECT clause, and check for a truncated file.

Pending source verification. Not yet checked against official documentation.

Related file status code