|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS Message Definition |
« View previous topic :: View next topic » |
Author |
Message
|
javaforvivek |
Posted: Tue Sep 14, 2004 10:47 pm Post subject: TDS Message Definition |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Hi,
I have a message like this:
<Blank Line>
<Blank Line>
Title1 Title2 Title3 Title4
---------------------------
T1,T2,T3,T4 <CR><LF> (Comma Separated Data)
A1,A2,A3,A4<CR><LF>
..... so on
This message consists of two blank lines at the begining, then a line containing titles, then a '----' line and then actual data which spans over multiple lines, each line contains comma separated data.
I have defined my message for comma separated data as TDS physical format, All elements delimited, Delimiter = ',' . But I don't know how to define first four lines of the message. My ultimate aim is to convert the CSV data in XML format and then process it to produce XML output. The first four lines are of no use to me.
Currently, I am using a Java Client to put this message on the input queue. And prior to putting this message, I am programatically removing first four lines and just putting CSV data to the input queue.
Can anybody suggest the proper message definition for this message, so that my Java code should not do the removal of the first four lines, and message flow should handle it. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
Ramphart |
Posted: Tue Sep 14, 2004 11:50 pm Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
Hi,
I'm assuming that the first four lines will also end in <CR><LF> and that there will always be exactly four lines to discard.
Message (DES=Tagged Delimited, Delim=<CR><LF>)
- JunkLines (Group) (repeat=no,DES=Tagged Delimited, Delim=<CR><LF>)
---Junk_field (repeat=yes, min occur=4,max occur=4,Repeat Element Delim=<CR><LF>)
- DataLines (Group) (repeat=yes,DES=Tagged Delimited, Delim=,)
---DataField1
---DataField2
---DataField3
This will give you the following MRM tree and you can process only the data lines:
(0x1000021)MRM = (
(0x1000013)JunkLines = (
(0x300000B)Junk_field = ' '
(0x300000B)Junk_field = ' '
(0x300000B)Junk_field = 'Title1 Title2 Title3 Title4'
(0x300000B)Junk_field = '--------------------------'
)
(0x1000013)DataLines = (
(0x300000B)Datafield1 = 'a'
(0x300000B)Datafield2 = 'b'
(0x300000B)Datafield3 = 'c'
)
(0x1000013)DataLines = (
(0x300000B)Datafield1 = 'd'
(0x300000B)Datafield2 = 'e'
(0x300000B)Datafield3 = 'f'
)
)
Regards _________________ Applications Architect |
|
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
|
|
|
|