This article explains how to get more information about error message from sqlcode.
Problem:
When running a program, we received a number of SQLCODE = -2627 from an EXEC SQL INSERT statement. There does not appear to be much information about this and other SQLCODE values. How can it be resolved?
Resolution:
The SQLCODE -2627 is not a code which is returned by the Micro Focus OpenESQL run-time system. It is instead returned from the ODBC driver that you are using. The best way to get more information on these undocumented codes is to make sure that you include the following data item in your program:
01 MFSQLMESSAGETEXT pic x(256)
When an error occurs, the actual error message text will be placed into this field so by displaying its contents you can find out the meaning of any ODBC error returned. You could also check the other fields in the SQLCA structure such as SQLSTATE to get more detailed information regarding the error that is occurring. In this case an error -2627 indicates that your INSERT statements are attempting to insert non-unique values into columns that are defined as no duplicates allowed.
Incident Number: 2132014