Hi
I am trying to find out how to do error handling for External Stored Procedures (specifically Stored Procedures (SP) programmed in C/C++).

I would like an example(s) if possible. (Especially how someone will
call the SP from the client side and access the error message)

Background info:

I currently have a SP that takes one input parameter and the
Language is C and the Parameter type is DB2SQL (no DBINFO).

CREATE SP_NAME (IN param INTEGER)
Language C
PARAMETER TYPE DB2SQL
NO DBINFO
PROGRAM TYPE SUB
(etc)

Stored Procedure implementation

extern "C" <return_type> SP_NAME (sqlint32 * param)
{
// code
}

Help would be appreciated