COBOL · File status code
What does File Status 21 mean in COBOL?
A sequential WRITE to a file with an ascending key requirement supplied a key value out of order relative to the previous record written.
A sequential WRITE to a file with an ascending key requirement supplied a key value out of order relative to the previous record written.
Sort the input driving the write loop by the same key before writing, or switch to indexed/relative access if input cannot be guaranteed pre-sorted.