DUPREC
The DUPREC, or duplicate record, error condition is used when a REC= clause is used on a file opened for the RELATIVE access method The DUPREC error condition may be used at the end of a program statement and in the Exit statement, but it is not accepted by the ON error statement.
Error Traps:
DUPREC traps an attempt to WRITE to an existing record (REWRITE must be used instead of WRITE).