COBOL · File status code

File Status 04

What does File Status 04 mean in COBOL?

A READ was successful, but the length of the record retrieved does not match the length defined for the file's record area in the program.

File Status 04IBM Enterprise COBOL · Micro Focus · GnuCOBOL

Condition

A READ was successful, but the length of the record retrieved does not match the length defined for the file's record area in the program.

Fix

Compare the FD record length against the copybook actually shipped with the data. This usually means the program is reading a file written by a different, incompatible layout version.

Pending source verification. Not yet checked against official documentation.

Related file status code