Meaningful errors from external stored procedure

General
Enthusiast

Meaningful errors from external stored procedure

Hi guys,

Is there a way to return meaningful error codes working with external stored procedure?

Detailed description:

When error occurs in external stored procedure then the value of SQLCode becomes non-zero and if not edited is returned to the user. The meaning of given SQLCode can be found in DBC.ErrorMsgs. For example for SQLCode 5628 we can use the following code:

Select *

from DBC.ErrorMsgs                    

where ErrorCode = 5628

Teradata returns one row:

5628    Column %FSTR not found in %VSTR.

Question:

How in external SP I can determine which %FSTR is not found in which %VSTR? How these names are returned when exception is generated?

Thanks and regards,

Dmytro Boiko