|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Tricky TDS parser behavior |
« View previous topic :: View next topic » |
Author |
Message
|
Tibor |
Posted: Tue Dec 09, 2003 4:06 pm Post subject: Tricky TDS parser behavior |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Some of applications are using a legacy interface format - luckily TDS can parse it. Looks like:
Code: |
UPDATE_REQUEST|id=1|
COMPONENT|com=1~id=2~....|
PROPERTY|p1|1|2|
PROPERTY|p2||Y|
...
END|
|
We built up the stuctures in 'Tagged Delimited' fomat (MRM/TDS) with nested compound structures:
type: UpdateRequest
- type: Component
- type: Property
and the Group Terminator is 'END|<LF>' for type 'UpdateRequest', and '|<LF>' for Component and Property.
BUT lately appeared a new 'Property' and caused a parser error:
Code: |
PROPERTY|XXX_STATUS||PEND|
|
because contents 'END|<LF>' !!! And parser message in the error log pointed accurately to the first byte after it.
Now we convert 'PEND' to 'PEND_' in BLOB format there and back to avoid parser error
Any ideas?
Tibor
Last edited by Tibor on Mon Dec 15, 2003 4:05 am; edited 1 time in total |
|
Back to top |
|
 |
Tibor |
Posted: Sat Dec 13, 2003 4:46 pm Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
OK, I wrote about a fabricated workaround, but this is ugly, slow, and so on. Anyone has some experince in TDS area or writing a simple parser is reasonable?
Tibor |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Dec 14, 2003 5:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I figured someone else would have answered by now.
You can probably make this work if you rearrange your model. In fact, it looks like you've got the classic/basic Header-body-trailer message. So you might as well model it that way
Make the END| a real element instead of being a group terminator. Then create a value constraint to make sure that it only holds END|. Put the LF as the group terminator. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|