Author |
Message
|
kirankinnu |
Posted: Tue Aug 30, 2005 7:56 am Post subject: error in procedure(Solved) |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
I have a message flow in that I am calling a stored procedure.
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNS';
CREATE FIRSTCHILD OF OutputRoot.XMLNS NAME 'Message';
DECLARE xmlRef REFERENCE TO OutputRoot.XMLNS.Message;
CALL Message_Create_V0('MessageID', xmlRef);
This is the procedure
CREATE PROCEDURE Message_Create_V0(IN id CHARACTER, OUT xmlRef REFERENCE)
BEGIN
IF id IS NOT NULL THEN
SET xmlRef.(XML.Attribute)id = id;
ELSE
SET xmlRef.(XML.Attribute)id = '';
END IF;
END;
I am not able to assign a value to the attribute id.
getting the following error in mqsi trace.
The dynamic field reference does not resolve to a modifiable quantity.
The dynamic field reference supplied must resolve to a modifyable quantity (a declared variable or a field in a modifyable message) as the usage implies that its value is to be changed.
Correct the logic of the SQL program and redeploy.
Thanks for any help.
Last edited by kirankinnu on Tue Aug 30, 2005 12:32 pm; edited 2 times in total |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Aug 30, 2005 9:51 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Shouldn't you be using CREATE PROCEDURE Message..... instead of CREATE PROCEDURE CALL.....
If that is not fixing it, can we have a better snippet of code....this one seems to have extra brackets and stuff.... |
|
Back to top |
|
 |
kirankinnu |
Posted: Tue Aug 30, 2005 11:09 am Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Every thing was given properly, those are just typos. |
|
Back to top |
|
 |
JT |
Posted: Tue Aug 30, 2005 11:29 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
CREATE PROCEDURE Message_Create_V0(IN id CHARACTER, OUT xmlRef REFERENCE) |
Try:
Quote: |
CREATE PROCEDURE Message_Create_V0(IN id CHARACTER, INOUT xmlRef REFERENCE) |
|
|
Back to top |
|
 |
mgk |
Posted: Tue Aug 30, 2005 12:08 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
|
Back to top |
|
 |
kirankinnu |
Posted: Tue Aug 30, 2005 12:32 pm Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Thanx mgk, Changing IN to INOUT worked. |
|
Back to top |
|
 |
mgk |
Posted: Tue Aug 30, 2005 12:49 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
I'm glad you have it working, but as I'm not one to take all the credit, JT suggested using INOUT, I suggested using IN
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|