If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > v8 Stored procedure problem on AIX (SQLCODE -440)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-03, 08:32
bobnorma bobnorma is offline
Registered User
 
Join Date: Oct 2003
Location: Florida
Posts: 15
Unhappy v8 Stored procedure problem on AIX (SQLCODE -440)

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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On