|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM Parsing of message with variable record formats |
« View previous topic :: View next topic » |
Author |
Message
|
Rookwood |
Posted: Tue Feb 08, 2005 3:38 am Post subject: MRM Parsing of message with variable record formats |
|
|
Novice
Joined: 26 Aug 2004 Posts: 13
|
Hi,
I've got to parse a message of form
<Fixed Length Header Format>
<Fixed Length common portion of record><Record Type><------------Format A of x fixed length-------->
<Fixed Length common portion of record><Record Type><----Format B of y fixed length fields----------------->
<Fixed Length common portion of record><Record Type><-Format C of y fixed length fields->
<Fixed Length Footer Format>
where the number of fields in formats A, B and C are very different and the file may contain n of each record type where 0 < n < undefined.
Which format is present in a particular record can be determined from the <Record Type> element.
I've tried modeling the message with TDS1, and creating a group with a composition of choice containing three different types containing the structures for the <Record Type><Fixed Length Format n>
I've used data pattern on the <Record Type>< to try to determine the format required based on known values for the <Record Type>.
The MRM parses the first record type and shows the correct format has been selected but doesn't then parse correctly from that point onwards, i.e. it doesn't assign data to subsequent fields in the selected format, rather it assigned the next bits of data to the following row.
Having used data pattern to determine the choice of 'format' do I then need to contoniue using data pattern to assign data to fields in that format?
I've trawled through the manuals and can't seem to get my head round the problem.
I'm also having problems combining various Data Element Separation types.
Below is a very basic layout of my MRM testbed.
Types
-Common Row
- FieldA (String)
- FieldB (String)
-Row
+ CommonRow (Common Row)
+ AltGroup
-RowType
+ Row (Row) Min=1 Max=1
-Message
- Header (String) Min=1 Max=1
+ RepeatRow (RowType) Min=1 Max= -1
- Footer (String) Min=1 Max=1
Groups
-AltGroup
- AltRowA (AltRowA)
-ID (String) - Data Pattern = TA
-FieldC (String)
-FieldD (String)
- AltRowB (AltRowB)
-ID (String) - Data Pattern = TC
-FieldE (String)
-FieldF (String)
-FieldG (String)
Hope explanation of problem makes sense. Any assistence greatly appreciated.
Running WMBI V5.0 CSD04
Regards
Rookwood _________________ GS |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 08, 2005 5:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It might be easier to model this with Tags instead of Data Patterns.
In this case you would use the Record Type as the tag and model the same way as you have.
I think you are correct that you have to give data patterns for the elements in order for it pick them up.
With Tags, you would set the type composition of the choice to Tagged Fixed Length, and the type composition of each record format type to Fixed Length.
You will have to assign a fixed length to each field in each record type. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Rookwood |
Posted: Tue Feb 08, 2005 10:49 am Post subject: |
|
|
Novice
Joined: 26 Aug 2004 Posts: 13
|
Thanks for the advice, I'll give it a go.
Cheers
Rookwood _________________ GS |
|
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
|
|
|
|