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 » Failing PASSTHRU function in common library

Post new topic  Reply to topic
 Failing PASSTHRU function in common library « View previous topic :: View next topic » 
Author Message
tez_i
PostPosted: Thu Apr 03, 2008 7:11 am    Post subject: Failing PASSTHRU function in common library Reply with quote

Novice

Joined: 03 Apr 2008
Posts: 12

I have been tasked to write a database logging function, which is called thoughout a fairly complex set of message flows. The logging was previously implemented as a subflow, but the project is being redesigned and they want this code moved to a common library.


The result being that, in a compute node (with data source set to, say DBSource) I have code like this:

CREATE COMPUTE MODULE msgflow_nodename
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
.....other statements....

CALL commonLogger (item1, item2, item3, item4);

.....other statements.....

RETURN TRUE;
END;
END MODULE;



and elsewhere I have ESQL code, not associated with a node, as follows:



CREATE PROCEDURE commonLogger(IN item1 CHARACTER, IN item2 CHARACTER, IN item3 CHARACTER, IN item4 CHARACTER)

BEGIN

...some validation....

PASSTHRU 'INSERT INTO mySchema.myTable (col1, col2, col3, col4) VALUES (?,?,?,?)'
TO Database.DBSource
VALUES (item1, item2, item3, item4);

END;



The result of this code is a Database Exception, with the following text:

CLI0110E Invalid output or indicator buffer specified. SQLSTATE=22002


I have tried a number of things including, not using a passthru, or using a passthru function instead of statement.

Any ideas what the problem is?
..or am I trying to do the impossible by taking the database logging out of a node and into common code. The architect here, swears that it is possible!
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Apr 03, 2008 8:47 pm    Post subject: Re: Failing PASSTHRU function in common library Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

tez_i wrote:
PASSTHRU 'INSERT INTO mySchema.myTable (col1, col2, col3, col4) VALUES (?,?,?,?)'
TO Database.DBSource
VALUES (item1, item2, item3, item4);



PASSTHRU ('INSERT INTO mySchema.myTable (
col1,
col2,
col3,
col4
)
VALUES (?,?,?,?)',
item1,
item2,
item3,
item4
);



Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
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 » Failing PASSTHRU function in common library
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.