COBOL · File status code
What does File Status 22 mean in COBOL?
A WRITE to an indexed or relative file attempted to add a record whose primary key duplicates an existing record.
A WRITE to an indexed or relative file attempted to add a record whose primary key duplicates an existing record.
Decide whether the intent was an update. If so, use REWRITE against an existing key instead of WRITE. If not, check the upstream process generating duplicate keys.