Skip to main content

This article describes the read part record error: "End of File before End of Record", or "file open in wrong mode".

Problem:

This error occurs when trying to read a control card file within a COBOL program. An example is a one-record parameter file with 9 bytes of data and filler to byte 80.

Resolution:

This error can occur when the file organization specified in the program does not match the actual file type.

If no organization is specified in the program, the default file type for sequential files is record sequential. A file created with a non-Micro Focus file editor will default to an organization of Line Sequential. The resolution is to change the SELECT statement to add the phrase:

Organization is Line Sequential

Old KB# 14229