|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS prob... Msg unable to parse properly at the last field |
« View previous topic :: View next topic » |
Author |
Message
|
lung |
Posted: Wed Feb 04, 2004 8:38 pm Post subject: TDS prob... Msg unable to parse properly at the last field |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
This is my first attempt at trying to use the TDS property of the MRM. Everything appears to turn out fine, except the last field of the message. Here is part of the unproperly parsed message...
Code: |
(0x300000B)ZipCode = '41250 '
(0x1000013)TelInfo01 = (
(0x300000B)TelCountryCode = '60 '
(0x300000B)TelAreaCode = '03 '
(0x300000B)TelNo = '34120015 '
)
(0x300000B)SupID = 'ÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙ..Ù' |
Ù is my delimiter. TelInfo01 is supposed to occurs 5 times, but due to empty fields, it is not shown in the trace. Between TelInfo01 and the SupID, there was supposed to be filler field, but it is also not displayed because it is an empty field. SupID is the last field in the message, and the value of it is supposed to be the '..' shown in the last bit of the code, and not with the Ù delimiters.
The problem now is that somehow, the delimiters for my TelInfo01 occurances ended up in my SupID field. How is it even possible that a delimiter can end up in a TDS field?
My Data Element Separation property of the compound type is set to Variable Length Elements Delimited because I also have some fixed length fields in the message. And I have checked each of the delimited fields in my message, including the SupID field, that they do not contain a length property defined in the message set.
In my TelInfo01, I have specified the same delimiter value for its Repeating Element Delimiter field.
I have tried to test without the TelInfo01 occurances (instead of occurs 5, it occurs once) but still some delimiters (such as the one used by the filler just before the SupID field) will end up in the SupID field.
Please help. I'm totally stumped at this behaviour of MQSI.  |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 05, 2004 1:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The behaviour of VED with repeating elements varies depending on whether you have the Delimiter Suppression property set. If you have it set to 'End of Type' then an absent element (such as your bitstream seems to suggest) will indicate that this is the end of the repeats because the Delimiter = RED. If you set the delimiter suppression to 'Never' then the parser will expect all the REDs to occur, even if the elements are absent.
VED will allow the delimiter to occur as part of the data in the last field of the type, as the delimiter is no longer relevant.
I am still a little confused as to why you are getting so many delimiters, as you say you only have 5 elements. Please could you list the variable-length fields in your message, so that I can try to work it out. |
|
Back to top |
|
 |
lung |
Posted: Thu Feb 05, 2004 2:26 am Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Thanks for the reply. I've been checking quite often back on this website... As this is quite urgent.
Anyway, I don't really get what you meant. I can't seem to find any Delimiter Suppression property. Where can I set this property?
I have tried switching my TelInfo01 Data Element Separation from Variables Element Delimited to All Elements Delimited, but the results are the same.
To clarify a bit on my message, basically my TelInfo01 compound type occurs 5 times, and within this TelInfo01, there are 5 sub elements. Hence the numerous amounts of delimiters you see in the SupID.
In between my TelInfo01 and my SupID fields, I also have a Filler field, which also doesn't seem to appear in my trace.
So how do I fix this? How can I stop the delimiters from appearing in my SupID field?
By the way, I'm on CSD03. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 05, 2004 5:01 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
1. Your CSD level does not have the 'Delimiter Suppression' property. This is a 5.0 feature.
2. There's a rule that says "If your Repeating Element Delimiter is the same as the enclosing Delimiter, then two delimiters occurring together in the bitstream will terminate the repeating element."
So...it looks as if the delimiters for the missing elements are terminating the repeating structure, and the rest of the delimiters are being assigned to the last element in the type (which is allowed according to the rule quoted earlier).
Can you post an example bitstream, so that we can be more specific about a possible solution |
|
Back to top |
|
 |
wooda |
Posted: Thu Feb 05, 2004 6:45 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
On the level of code you have. I think you have 2 options.
1.) Is insert five references to TelInfo01 and not 1 repeating one.
+ This will also work and give you a node in the tree for TelInfo01.
- You end up inserting the element 5 times when all five are a repeat of the same element. A bit clunky.
2.) you can use TDS separtion technique of PATTERN. Which I believe is in CSD3 (although it may only be in CSD4 not sure.) I wont go into detail but this basically involves using a regular expresion lime pattern to parse each instance of TelInfo01 and then parsing the substructure using another separation such as VED or AED.
The least desirable of the 2 options I would say.
+ One instace of TelInfo01
- Complicated pattern matching required. Will result in a performance degredation and a less understandable model. |
|
Back to top |
|
 |
lung |
Posted: Fri Feb 06, 2004 6:42 pm Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Thanks for all the clarifications, guys.
Now I understand completely (I hope).
Anyway, I've redesigned my compound type according to zanda's method no. 1, and now everything works fine.
Thanks again!  |
|
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
|
|
|
|