ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling SP in ESQL - out parm char doesn't get populated

Post new topic  Reply to topic
 Calling SP in ESQL - out parm char doesn't get populated « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Tue Mar 06, 2007 8:06 am    Post subject: Calling SP in ESQL - out parm char doesn't get populated Reply with quote

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
View user's profile Send private message
madi
PostPosted: Tue Mar 06, 2007 8:35 am    Post subject: Reply with quote

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
View user's profile Send private message
pcelari
PostPosted: Tue Mar 06, 2007 8:50 am    Post subject: Reply with quote

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
View user's profile Send private message
madi
PostPosted: Tue Mar 06, 2007 8:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling SP in ESQL - out parm char doesn't get populated
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.