|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM and repeating groups |
« View previous topic :: View next topic » |
Author |
Message
|
wooda |
Posted: Thu Feb 05, 2004 3:48 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
As everything is fixed length then you will be using CWF physical format.
If you use CWF physical format then you can make use of the repeat reference function in your message model.
Now From what you have said it seems that the field NUMBEROFITEMS is a repeat count for the following structure which contains (PLANT, CURRENCY, MATERIAL GRP, COST_CENTRE)
So what you need to do is model
NUMBEROFITEMS as an integer field.
Then create an embedded group (compound type in V2.1) with the following fields in.
In the CWF physical format properties that embedded structure will have a repeat count. This can be made to be a reference to the field NUMBEROFITEMS. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 05, 2004 6:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Here's what your message structure would look like - HeaderInfo
- Line Items
- NumberOfItems
- Item
- Plant
- Currency
- MaterialGroup
- CostCentre
Then, as Zanda said, set the repeat count of the Item to be the NumberOfItems field (which has to be an integer).
In ESQL, you would access the third Item like
Code: |
Body.LineItems.Item[3] |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wooda |
Posted: Thu Feb 05, 2004 7:31 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
I'm no COBOL expert but it looks as though your ITEM-GROUP is a lower level than NUMBEROFITEMS. Is this the case ? After the import
does it appear as a sibling of ITEM-GROUP ?
For repeat reference to be allowed on an element/type it has to have a preceeding sibling (ie. same level) element of type INTEGER. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 05, 2004 7:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
zanda wrote: |
\For repeat reference to be allowed on an element/type it has to have a preceeding sibling (ie. same level) element of type INTEGER. |
Exactly. You could change this by changing ItemGroup to be an 05 instead of a 10 level item, and then redoing the import.
Or you could just rearrange it around in the Message Set. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|