|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Multiline record MRM parsing |
« View previous topic :: View next topic » |
Author |
Message
|
aq |
Posted: Mon Sep 13, 2004 8:51 am Post subject: Multiline record MRM parsing |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
Hi
I have tough question about the MRM parsing (tough atleast for me).
We receive message that contains multiple orders. Each order has:
- 1 header (1 line)
- 1 or more products (1 .. * lines)
- 0 to 1 additional details / instructions (0 or 1 line)
Each line contains record that is only part of the order. Record type (HEADER, PRODUCT, DETAILS) is told by first item in record. Second item in each record is order id (1000, 1001, 1002, 1003) and tells to what order this line belongs (grouping factor for single order).
Items in record are separated by ',' delimeter + are fixed length.
Is it possible parse this kind of data (look example data) to tree like structure (look example MRM tree) by just using the MRM parsing ? (and if yes how ???)
== EXAMPLE DATA =================
HEADER,1000,2004-09-03
HEADER,1001,2004-09-08
HEADER,1002,2004-09-08
HEADER,1003,2004-09-13
PRODUCT,1000,1,Apples
PRODUCT,1000,2,contact admin
DETAILS,1000,Your apples are so good.
PRODUCT,1001,1,Apples
PRODUCT,1001,3,Oranges
PRODUCT,1001,4,contact admin
PRODUCT,1002,3,Oranges
PRODUCT,1003,2,contact admin
PRODUCT,1003,4,contact admin
DETAILS,1003,Please deliver them fast !
=================================
== EXAMPLE MRM TREE =============
Orders
|
|
- Order
|
- product (Apples)
|
- product (Banana)
|
- id (1000)
|
- date (2004-09-03)
|
- details (Your apples are so good.)
|
|
- Order
|
- product (Apples)
|
- product (Oranges)
|
- product (contact admin)
|
- id (1001)
|
- date (2004-09-08)
|
|
- Order
|
- product (Oranges)
|
- id (1002)
|
- date (2004-09-08)
|
|
- Order
|
- product (contact admin)
|
- product (contact admin)
|
- id (1003)
|
- date (2004-09-13)
|
- details (Please deliver them fast !)
=================================
Very much thanks for answers !
Regards,
a |
|
Back to top |
|
 |
Ramphart |
Posted: Mon Sep 13, 2004 9:19 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Sep 13, 2004 9:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yeah, this is a basic tagged/delimited message.
But you won't get the kind of tree you want - not unless you sort your data by the order number first. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
aq |
Posted: Wed Sep 15, 2004 12:29 am Post subject: |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
The link was very helpful.
Guess I have to do some ESQL "preparsing / sorting" for data, but oh well cannot have everything (it just would have been nice).
Thanks for you answers ! |
|
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
|
|
|
|