COBOL · File status code

File Status 02

What does File Status 02 mean in COBOL?

On a READ or WRITE against an indexed file, the record's key duplicates an existing record's alternate key, or a duplicate condition was otherwise allowed and detected.

File Status 02IBM Enterprise COBOL · Micro Focus · GnuCOBOL

Condition

On a READ or WRITE against an indexed file, the record's key duplicates an existing record's alternate key, or a duplicate condition was otherwise allowed and detected.

Fix

Confirm whether the alternate key involved is defined WITH DUPLICATES. If it should be unique, check the write logic that produced the duplicate value upstream.

Pending source verification. Not yet checked against official documentation.

Related file status code