Posted: Fri Aug 08, 2003 5:29 am Post subject: Many to one Mapping
Acolyte
Joined: 20 Jun 2002 Posts: 59
Hi
i am using the following code to Map EchoToken XML field , which is coming in 4 different paths to TSR MRM Field.
DECLARE Path REFERENCE TO "InputRoot"."XML"."ServiceData"."reqInfo";
SET OutputRoot.MRM.TSR =
CASE
WHEN (Topic = 'CHECKOUT') THEN Path."RentalCreateRQ".(XML.attr)EchoToken
WHEN (Topic = 'CHECKIN') THEN Path."RentalModifyRQ".(XML.attr)EchoToken
WHEN (Topic = 'CREATERES') THEN Path."OTA_VehResRQ".(XML.attr)EchoToken
WHEN (Topic = 'SIGNIN')THEN Path."SessionCreateRQ".(XML.attr)EchoToken
END;
Is there any other way of doing this with out using the Case Statement and with out checking the Topic as CheckIn, CheckOut, CreateRes and SignIn
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
It depends on what is within path.
If EchoToken is on a fixed place (first, last or whatever) in the first field within Path then you can use something like
Code:
SET OutputRoot.MQM.TSR = Path.*[1].(XML.attr)EchoToken.
_________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
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