I am trying to write an error-handling routine in my COBOL program for connecting, reading, inserting and deleting tables in my SQL database and would like to know where I can find a list that contains all the possible errors that can potentially be generated along with their code and description. The error codes and their description are assigned to the following variables:
05 SQLCODE PIC S9(9) COMP-5 VALUE 0.
05 SQLERRM.
49 SQLERRML PIC S9(4) COMP-5.
49 SQLERRMC PIC X(70).
These variables are part of the copybook located at : “ C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\cpylib\\sqlca.cpy”
As an example, a table row containing a null field returns and assigns the error code “0000000001” to the SQLCODE variable and the description of “NULL value returned but no indicator variable supplied.[12]” to the variable SQLERRMC. Having a list of all possible error codes and their description in advance would make it easier to write an error handling routine rather than trying to manually generate errors in order to obtain their description and code number for error handling. Hopefully this makes sense. Thanks in advance.



