|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Calling SP in ESQL - out parm char doesn't get populated |
« View previous topic :: View next topic » |
Author |
Message
|
pcelari |
Posted: Tue Mar 06, 2007 8:06 am Post subject: Calling SP in ESQL - out parm char doesn't get populated |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
First, thanks to the help from "Grand Poobah", I setup my catalog and odbc.
I tested my remote SP from DB2 CLI, successfully by
db2=> call DB2SP_GETCUSTNAME (10030-134, ?, ?)
A_RETURNCODE: 0
A_RETURNMESSAGE: Brian C Clipper
"DB2SP_GETCUSTNAME" RETURN_STATUS: 0
In my compute node ESQL, I define the procedure:
create procedure CallMySP
(in ID char,
out returnCode integer,
out ResultMsg char) language DATABASE
external name "DB2SP_GETCUSTNAME";
here's the code I use to call the procedure:
...
declare ret_code integer;
declare msg char;
call CallMySP(InputBody.ID, ret_code, OutputRoot.MRM.CustName);
Although the out parameter ret_code is assigned to 0, the OutputRoot.MRM.CustName didn't get populated.
It seems to me only character field has such problem. Can anyone shed some light on this? It must be sth trivial I'm missing.
many thanks, _________________ pcelari
-----------------------------------------
- a master of always being a newbie
Last edited by pcelari on Tue Mar 06, 2007 11:41 am; edited 1 time in total |
|
Back to top |
|
 |
madi |
Posted: Tue Mar 06, 2007 8:35 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
try to call with a char variable in place of Custname and see if it works
--madi |
|
Back to top |
|
 |
pcelari |
Posted: Tue Mar 06, 2007 8:50 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
madi wrote: |
try to call with a char variable in place of Custname and see if it works
--madi |
that's what I did. it got assigned only an empty string, of length 1, just as the current output msg. No exception though.
thank you. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
madi |
Posted: Tue Mar 06, 2007 8:58 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
pcelari wrote: |
that's what I did. it got assigned only an empty string, of length 1, just as the current output msg. No exception though.
thank you. |
well then are u sure the ID is the right value that is being passed to the SP??
a trace would be helpful
--madi |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|