|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS/fixed length elements/variable length compound types |
« View previous topic :: View next topic » |
Author |
Message
|
solomita |
Posted: Wed Sep 17, 2003 7:36 am Post subject: TDS/fixed length elements/variable length compound types |
|
|
Voyager
Joined: 06 May 2003 Posts: 94
|
I am trying to transform a text message to an XML message. The problem is that while each line of data ends with a <CR><LF>, each line of data has a variable number of elements.
For example, the message set contains 4 headers and a trailer record which I have created as 5 separate compound types. Within each of these compound types, there are fixed length elements and the compound type ends with the <CR><LF>. The system sending me the message will truncate trailing spaces. However, if the last non-blank element is supposed to be 10 byes of data and there are only 5, it will pad the additional 5 with spaces and truncate the rest of the fields.
I am not sure the best way to handle this. I tried to do fixed length with group inititiators and terminators but if the first compound type does not get padded out to its 80 bytes, then all of my parsing is off. I would have expected that as soon as the <CR><LF> was reached it would know that the stream of data had ended.
Any suggestions? |
|
Back to top |
|
 |
solomita |
Posted: Thu Sep 18, 2003 6:13 am Post subject: |
|
|
Voyager
Joined: 06 May 2003 Posts: 94
|
Does anyone have any suggestions on this? |
|
Back to top |
|
 |
EvolutionQuest |
Posted: Thu Sep 18, 2003 10:19 am Post subject: |
|
|
 Voyager
Joined: 18 Sep 2001 Posts: 88 Location: Billings, MT
|
Holly:
If you have not resolved this yet pass your information onto Pradeep and he can forward it onto me, and we can try to help you. From observation I am not fully clear if the problem you are reflecting is the last field getting padded if it is shorter than the length of the field.
Hope all is well. _________________ Don't blame technology, for technology was created by humans! |
|
Back to top |
|
 |
solomita |
Posted: Thu Sep 18, 2003 10:34 am Post subject: |
|
|
Voyager
Joined: 06 May 2003 Posts: 94
|
Hi Chris,
Actually, Pradeep and I were working on it together. We came up with a solution to use TDF with CRLF, pad the data we get in to the max of 80 and then parse it with the original CWF format.
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
|
|
|
|