Hi all,
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
LANGUAGE C
PARAMETER STYLE SQL
NO DBINFO
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 PROBLEM:
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.
QUESTION:
So I think I'm asking does anyone know how to get the schema name added to the "current path" ?
thanks....bob