Symptom
When PowerBuilder is connected to DB2 using ODBC and calling a stored procedure written in COBOL using RPC, the following DB2 error message is returned:
SQLSTATE=38503 [IBM][CLI Driver][DB2/NT64] SQL1131N A stored procedure process has been terminated abnormally
Environment
-
PowerBuilder
-
ODBC
-
IBM DB2
Reproducing the Issue
-
In PowerBuilder, connect to DB2 using ODBC.
-
Call a stored procedure that is written in COBOL.
-
The following DB2 error message may be returned:
SQLSTATE=38503 [IBM][CLI Driver][DB2/NT64] SQL1131N A stored procedure process has been terminated abnormally
Cause
DB2 server error
Solution
Add CURRENTFUNCTIONPATH='XXX' in the db2cli.ini file where 'XXX' is the schema name and
Add PBUSEPROCOWNER='YES' in the pbodbcXXX.ini file where XXX is the PowerBuilder version (for example, pbodbc220.ini).