|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM PARSER ISSUE |
« View previous topic :: View next topic » |
Author |
Message
|
verdyan |
Posted: Sun Feb 18, 2007 7:36 am Post subject: MRM PARSER ISSUE |
|
|
Novice
Joined: 24 May 2005 Posts: 13
|
Hello
1. i'm trying to parse message using MRM parser (TDS Format).
2. message built from different kind of lines without any delimiter between the lines.
3. for example one line looks like this :
099@1@123456789@123456789123456789
4. other lines looks like this :
017@k@1234@56789@012345@678901@234567890@12345678912345
5. lines repeats many times , in any order , for example :
AAABBABAB or BABABABABAB , ext.
6. First 3 leters values are different for any kind of line.
Any suggestion for building best parser for this problem ?
Thanks _________________ AV |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Feb 18, 2007 8:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, TDS is the right parser to use.
Use the first three characters as the tag.
You probably need three groups:
1) choice between types (A, B, etc)
2) repeating structure
3) message that holds repeating structure _________________ I am *not* the model of the modern major general.
Last edited by jefflowrey on Sun Feb 18, 2007 5:41 pm; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Sun Feb 18, 2007 1:15 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Just to back up what Jeff said...
- TDS is the correct physical format to use
- Your message model needs to look something like this:
Code: |
Element 'Message' type=CTMessage
Complex Type 'CTMessage' Composition='Choice' maxOccurs=-1 Data Element Separation='Tagged Delimited' Delimiter=<CR> Group Terminator=<CR> Tag Data Separator='@'
Local Element 'el099' Type='CT099' Tag='099'
Local Element 'el017' Type='CT017' Tag='017'
Complex Type 'CT099' Data Element Separation='All Elements Delimited' Delimiter='@'
Local Element 'el099.1'
Local Element 'el099.2'
Local Element 'el099.3'
...
Complex Type 'CT017' Data Element Separation='All Elements Delimited' Delimiter='@'
Local Element 'el017.1'
Local Element 'el017.2'
Local Element 'el017.3'
...
Complex Type 'CT0XX' Data Element Separation='All Elements Delimited' Delimiter='@'
Local Element 'el0XX.1'
Local Element 'el0XX.2'
Local Element 'el0XX.3'
...
|
Please note, however, that I am making some assumptions here.
- I have made CT099 a repeating choice. You should think carefully about whether that is exactly what you require.
- You said 'message built from different kind of lines without any delimiter between the lines. ' Not sure what you mean by that. I assumed that you use CR as a line separator.
- CT099 and CT017 do not need to be global complex types - I just did it that way to make it easy to describe. |
|
Back to top |
|
 |
verdyan |
Posted: Mon Feb 19, 2007 3:59 am Post subject: Thanks |
|
|
Novice
Joined: 24 May 2005 Posts: 13
|
Thank you,
I succeded doing it as you suggested.
Using group terminator and separation tag.
Best regards, _________________ AV |
|
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
|
|
|
|