Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
Is this a UNIQUE or non-UNIQUE alternate-key? If it's non-UNIQUE, then the DUPKEY condition will be raised, but you need to either handle this using the RESP (or NOHANDLE) parameter of the API or by specifying an IGNORE CONDITION DUPKEY END-EXEC statement.
If DUPKEY is raised on a UNIQUEKEY, then this is an error.
When an error condition is raised, in particular ILLOGIC, the first three-bytes of EIBRCODE provides you with a wealth of information, in regards to actual VSAM return-codes, error-codes and reason-codes.