|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Failing PASSTHRU function in common library |
« View previous topic :: View next topic » |
Author |
Message
|
tez_i |
Posted: Thu Apr 03, 2008 7:11 am Post subject: Failing PASSTHRU function in common library |
|
|
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 |
|
 |
Gaya3 |
Posted: Thu Apr 03, 2008 8:47 pm Post subject: Re: Failing PASSTHRU function in common library |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|