Author |
Message
|
sebastian |
Posted: Fri May 07, 2004 6:03 am Post subject: TDS message modeling - repeating segments |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
TDS message modeling
I am trying to model a TDS message that has repeating segments. My message input looks like the following:
input examples:
BEGINSEG_1AABB (single occurence of segment)
BEGINSEG_1AABBSEG_1CCDDSEG_1EEFF (3 occurences of segment)
desired output:
(single occurence of segment)
<?xml version="1.0" ?>
- <MRM xmlns="www.mrmnames.net/DS73Q0G0AG001">
- <TDSmsg2>
- <subsection1>
<EL_1>AA</EL_1>
<EL_2>BB</EL_2>
</subsection1>
</TDSmsg2>
</MRM>
(3 occurences of segment)
<?xml version="1.0" ?>
- <MRM xmlns="www.mrmnames.net/DS73Q0G0AG001">
- <TDSmsg2>
- <subsection1>
<EL_1>AA</EL_1>
<EL_2>BB</EL_2>
</subsection1>
- <subsection1>
<EL_1>CC</EL_1>
<EL_2>DD</EL_2>
</subsection1>
- <subsection1>
<EL_1>EE</EL_1>
<EL_2>FF</EL_2>
</subsection1>
</TDSmsg2>
</MRM>
I have two compound types defined. One named 'MSG_CONTAINER'and another named 'SEG_1.'
MSG_CONTAINER has a group indicator of 'BEGIN'and the data element separation of Fixed Length. SEG_1 had a group indicator of 'SEG_1' and the data element separation of Fixed Length. SEG_1 has two element type defined within it. They are named EL_1 and EL_2 and both have a length of 2.
Under my Messges folder, I have a main message of TDSmsg2 and its type is MESSAGE_CONTAINER. TDSmsg2 has an element named subsection1 that has a type of SEG_1.
If I configure subsection1 under the connection tab as Repeat = No and send input data of 'BEGINSEG_1AABB', I get my desired results as above. When I configure subsection1 under the connection tab as Repeat = Yes and send input data of 'BEGINSEG_1AABBSEG_2CCDDSEG_EEFF', the message fails and I get the error message of "( PRWAPMQADM01DBK.seb_ex_group ) The bitstream of a TDF message is longer than expected.
The TDF parser could not complete parsing because the bitstream contains more data than expected. This could be caused by either an incorrect message definition or by an incorrect message.
Make sure that the incoming message is a correct TDF message"
The input data looks good. I must be defining something incorrectly for the message definition but I do not know what the problem is.
I would appreciate any feedback.
Sebastian _________________ sebastian signature |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 07, 2004 6:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't think you want your DES on your message to be fixed length.
I think it should be "Variable items delimited" or "all items delimited".
But since I haven't played with TDS under v5 yet, I'm doing some experiments. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fschofer |
Posted: Fri May 07, 2004 6:42 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
i would use tagged/fixed length for SEG_1 with tag length of 5
and would add SEG_1 as tag value.
(Remember you have also fill the full length of your tag vene if you only add spaces)
And remove group_indicator SEG_1
Greetings
Frank |
|
Back to top |
|
 |
sebastian |
Posted: Fri May 07, 2004 7:01 am Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
Frank:
I tried your suggestion. I get the error message of
PRWAPMQADM01DBK.seb_ex_group ) No Length associated with fixed length data
The TDF parser could not extract data from the bitstream because a Fixed Length element was expected, but no Length or LengthRef was defined in the dictionary.
Define a Length or LengthRef property for all Elements in the message for which a Length is required.
I think you may have thought that the elements within the SEG_1 compound have tags in the data, but there are none. Only a marker at the beginning of the repeating segment.
SEG_1AABB(segment then repeats)SEG_1DDEE(and again)SEG_1FFGG
Seb _________________ sebastian signature |
|
Back to top |
|
 |
fschofer |
Posted: Fri May 07, 2004 7:17 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
OK,
found my error thinking in MRM is not the easiest
i would use tagged/fixed length for SEG_1 with tag length of 5
exchange in the sentence above SEG_1 with MESSAGE_CONTAINER
Greetings
Frank |
|
Back to top |
|
 |
sebastian |
Posted: Fri May 07, 2004 8:24 am Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
Frank:
I tried your suggestion but I get the error message of
( PRWAPMQADM01DBK.seb_ex_group ) No Length associated with fixed length data
The TDF parser could not extract data from the bitstream because a Fixed Length element was expected, but no Length or LengthRef was defined in the dictionary.
Define a Length or LengthRef property for all Elements in the message for which a Length is required.
I am not sure why this is since I see all of the lengths defined.
Sebastian _________________ sebastian signature |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 10, 2004 1:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Was that supposed to be a response to the previous post, or was it an accidental re-posting of your last message? |
|
Back to top |
|
 |
sebastian |
Posted: Mon May 10, 2004 3:54 am Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
My email was a response to Frank's updated email....I still can not get this to work and everything appears correct. I am on v2.1 using base levels of control center, configuration manager and NT broker.
Is it possible that my problem is due to a missing CSD upgrade?
Seb _________________ sebastian signature |
|
Back to top |
|
 |
wooda |
Posted: Mon May 10, 2004 4:23 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Hi Sebatian -
I recommend that you try at least V2.1 CSD3 level.
I think Frank's approach is the correct one.
Making MSG_CONTAINER tagged fixed length with Group Indicator of BEGIN, and making SEG_1 the tag of the child element.
Try this approach at CSD3 level.
Regards,
Alex |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 11, 2004 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I've come across this a couple of times recently. Don't use Group Indicators unless you really need them. Tags are much simpler, and they seem to work better when resolving choices. |
|
Back to top |
|
 |
wooda |
Posted: Tue May 11, 2004 1:05 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
If MSG_CONTAINER is part of some larger structure then by all means consider using tags there too.
But from what Sebastian wrote in this post then it appears MSG_CONTAINER was the outermost level of strucutre and therefore it does not make sense to use a tag here. This is exactly where a group indicator should be used.
In think we are all in agreement that tag fixed length should be used for the structure within MSG_CONTAINER.
p.s. I don't see a choice in this message am I missing something ?
Regards. |
|
Back to top |
|
 |
|