Author |
Message
|
TonyD |
Posted: Tue Dec 17, 2002 5:38 pm Post subject: Compound Element question |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Am sure there is a simple answer to this but here goes:
I am mapping XML to MRM (generated from Cobol Copybook). I have a Cobol compound element:
05 POLICYNO
10 FIRST-THREE PIC X(3)
10 LAST-SEVEN PIC X(7)
The XML element is PolicyNo. In my ESQL I 'SET Output.POLICYNO = Input.PolicyNo' (this is not the exact ESQL of course).
The trace shows that the mapping has occurred correctly but I get a Parser Exception that references the 'FIRST-THREE' field and indicates that the output tree that has been created does not match the logical definition.
I would like to be able to set either POLICYNO to a value, or alternatively set FIRST-THREE and LAST-SEVEN individually to values. Can I do this. I was under the impression that all three elements are addressable and that the parser would only object if, for example, I tried to set POLICYNO and FIRST-THREE, or set LAST-SEVEN but did not set FIRST-THREE. |
|
Back to top |
|
 |
kirani |
Posted: Tue Dec 17, 2002 7:20 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
POLICYNO is a parent element with 2 child elements, as such it will not contain any value. You should be able to refer to the child element values by using appropriate reference name like, POLICYNO.FIRST-THREE or POLICYNO.LAST-SEVEN.
If you want to assign value from both the fields to your output XML element then use ESQL similar to this,
Code: |
SET OutputRoot.XML.Parent.PolicyNo = InputRoot.MRM.XYZ.POLICYNO.FIRST_THREE || InputRoot.MRM.XYZ.POLICYNO.LAST_SEVEN;
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
TonyD |
Posted: Tue Dec 17, 2002 7:31 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Thanks for reply....I am going from XML input to MRM output. I could map the incoming 10-character PolicyNo to the two MRM fields with substring but would prefer to just map straight to the group item.
Will I have to redefine POLICYNO (which as you say has no length attribute of its own) with a POLICYNO_X PIC X(10) in order to map the 10 bytes with a single SET statement? |
|
Back to top |
|
 |
kirani |
Posted: Tue Dec 17, 2002 8:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
sorry, I misunderstood your question!
Yes, you need to redefine POLICYNO group item with POLICYNO_X PIC X(10) element. After doing this you should be able to assign 10 byte long value to this field. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
TonyD |
Posted: Tue Dec 17, 2002 8:44 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Thanks Kirani...I created a little copybook with a 'REFINED' field and loaded it into the CC to see how WMQI deals with it...clear now. Thanks for the advice. |
|
Back to top |
|
 |
Swathi3 |
Posted: Mon Jun 10, 2013 11:21 pm Post subject: Handle Single Request - Multiple responses in Message Broker |
|
|
Newbie
Joined: 10 Jun 2013 Posts: 2
|
Hi,
We have a situation in which for each single request sent to the backend from a message flow we might get 10 or 14 reply messages from the backend depending on the request message but we have to send only one reply message to the frontend application. Also, we have a tag in the reply message by which we can decide if it's the last response in the series of replies. Can we use MQGET node for this? If yes, can someone clearly explain how to achive this using get message by corellation id? |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 11, 2013 1:10 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Please to not double post. It only serves to get people annoyed.
We don't really like re-opening 11 year old posts either.
It is better to create a new one and reference the old posts. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|