Problem:
What causes Truncated Records?
Resolution:
If a program defines a record length that is less than the length of the records in the data file, the data will be truncated and no warning messages are generated.
This is a feature of COBOL fixed length records. Record description entries need not describe the entire record. This could be useful, for example, to allow expansion of the record description without having to enter a filler in each record description. A RECORD Clause with CONTAINS n CHARACTERS can be used to define a fixed length record.
For variable length records, a RECORD Clause can also define the minimum and maximum length of the records in the file. The record descriptions cannot be less than the minimum nor greater than the maximum record area, but equality is not required in either case.
The compiler issues an error when a record shorter than the minimum record length is described for a file with variable length records.