Processing existing files

When your program processes an existing file, code the description of the file in your COBOL program to be consistent with the file attributes of the data set, for example:

File format Requirement
Format-V files or
Format-S files
The maximum record length specified in your program must be exactly 4 bytes smaller than the length attribute of the data set.
Format-F files
The record length specified in your program must exactly match the length attribute of the data set.
Format-U files
The maximum record length specified in your program must exactly match the length attribute of the data set.
Remember: Information in the JCL overrides information in the data set label.

For details about how record lengths are determined from the FD entry and record descriptions in your program, see the Enterprise COBOL for z/OS® Programming Guide.