Unanswered: v8 Stored procedure problem on AIX (SQLCODE -440)
I need some help with the new version 8 cataloging of stored procedures, here is what I'm working with:
1) The stored procedures are written in C++
2) I cataloged the the procedures with the following:
SET SCHEMA WMMISX@
CREATE PROCEDURE FOO (IN CMPNY CHAR(3), IN UNIT CHAR(13), IN OLDSTATUS CHAR(5), OUT RESPONSE CHAR(254),OUT ERRORCODE INTEGER)
DYNAMIC RESULT SETS 1
PARAMETER STYLE SQL
FENCED NOT THREADSAFE
MODIFIES SQL DATA
PROGRAM TYPE SUB
EXTERNAL NAME 'Myprocedures!Foo'@
3) I had data security grant execute to everyone in our group
The procedures are found and work just fine when I create the procedures with my login id.
When I create the procedures with a different owner/schema I get the -440 error.
I tried using the prep and bind - options qualifier and even funcpath with no luck.
I added some code to my application to get the "current path" and the schema name "wmmisx" is not there:
( EXEC SQL VALUES (CURRENT PATH) INTO :CURPATH; )
just the standard (sysibm, sysfun...) with my user id appended to the end.
I think if I could get the schema name "wmmisx" added to the path db2 could then find the procedure.
by the way the application I have is also written in c++ with embedded dynamic sql ( CALL Foo(?,?,?,?,?) ), ex..
ps.... If I change the CALL statement and add the schema name, ex:
WMMISX.CALL Foo(?,?,?,?,?) )
everything works as well.
So I think I'm asking does anyone know how to get the schema name added to the "current path" ?