|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Group Terminator in Fixed Length file |
« View previous topic :: View next topic » |
Author |
Message
|
Gemz |
Posted: Wed May 07, 2008 9:02 am Post subject: Group Terminator in Fixed Length file |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Hi,
I am using WMB 6.1.
My input file is a Fixed Length format with <LF> as Group Terminator.
Sometimes i am getting <CR><LF> in the input file. Since it is a fixed length file, MB is not able to parse the message correctly as per message sets.
Can you pls help me to handle both <LF> and <LF><CR>
Many Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 07, 2008 10:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Let me check that I understand.
- your file consists of lines of fixed-length records
- lines are usually terminated by <LF>
- lines are sometimes terminated by <CR><LF>
If so, TDS can handle this just fine. You need to
- create a complex type representing your fixed-length structure
- add a local group, set its Data Element Separation to Fixed Length, and set its Group Terminator to <CR><LF>
- under the first local group, create a second local group, fixed length, with Group Terminator set to <LF>
- Add the members of the record to the innermost local group.
When searching for a terminator, the TDS parser always looks for the longest match. If the line ends with <CR><LF> then it will ignore the innermost group and match against the outer one. If it ends with <LF>, it will match against the innermost group. Either way, you will get the correct result. |
|
Back to top |
|
 |
Gemz |
Posted: Thu May 08, 2008 9:10 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Hi Kimbert,
Many Thanks.... It works fine as per your suggestion.  |
|
Back to top |
|
 |
Gemz |
Posted: Thu May 08, 2008 9:38 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Kim,
As you said it is working.
Quote: |
- Add the members of the record to the innermost local group. |
Instead of adding the elements in the innermost local group, I added only the local groups in the existing message set.
So the records are not defined under the innermost local group. It is also parsing the message correctly. Do you think will create any problem?
Thanks |
|
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
|
|
|
|