Here is the message I drop onto the queue:
<Request><EmpNo>000100</EmpNo><RequestType>NEW</RequestType><OrderNo>999999</OrderNo></Request>
Here is my Compute Node ESQL:
SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.XML.Request.OrderNo = '123456';
IF InputRoot.XML.Request.EmpNo = '000100'
THEN
SET OutputRoot.XML.Request.Country = 'AMERICA';
ELSE
IF InputRoot.XML.Request.EmpNo = '000200'
THEN
SET OutputRoot.XML.Request.Country = 'UNITED KINGDOM';
ELSE
SET OutputRoot.XML.Request.Country = 'DENMARK';
END IF;
END IF;
SET OutputRoot.XML.Request.Version = '000005';
And this is what I get in my out queue:
<Request><EmpNo>000100</EmpNo><RequestType>NEW</RequestType><OrderNo>999999</OrderNo></Request><Request><OrderNo>123456</OrderNo><Country>DENMARK</Country><Version>000005</Version></Request>
Questions:
1. I am trying to change OrderNo from 999999 to 123456, but instead I append a second OrderNo to the end of the message. How do I just change it rather than duplicating it?
2. Why do I keep dropping thru the IF statement to the last ELSE? The message coming in has an EmpNo of '000100', so why isn't the first IF catching it?
Also, why the heck did my post come out so wide? I have to scroll to see it all.
_________________
Peter Potkay
MQSeries Certified Specialist
[ This Message was edited by: PeterPotkay on 2002-03-11 10:20 ]
[ This Message was edited by: PeterPotkay on 2002-03-11 10:36 ]
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