The omission and truncation of elements is dependent on the setting of the property Suppress Absent Element Delimiters. A description of this can be found in Complex type TDS properties, Global group TDS properties, or Local group TDS properties.
If you have created a message in which some elements are optional, an input message might not contain all defined elements. If the elements are in a complex type that you have defined with the Data Element Separation property of the type set to All Elements Delimited or Variable Elements Delimited (in which the elements are separated by a delimiter and have no tag), any elements that are missing from the end of the complex type must be indicated by the application that creates the message in one of two ways. These both provide techniques to avoid unnecessarily long sequences of delimiters, and to preserve consistent representation of missing elements.
This is known as the truncation method, in which missing elements are treated as not expected, and both data and delimiters are omitted in the bit stream.
For example, you define a complex element C that has four optional elements. You set the Delimiter property to the character plus (+). You define complex element P, and set the Delimiter property of P to asterisk (*). You add three elements to P, the first is a string, the second is complex element C, and the third is a string.
When a particular instance of the message is received by the broker, all the elements of P are present, but only the first two elements of C are present. The data in the message appears as follows if the truncation method is used (where Pn are the values of the elements of P and Cn the values of the elements of C):
P1*C1+C2*P3
When the parser encounters the second asterisk delimiter, it determines that the last two elements of complex element C are not present, and the next element is the third element of P.
You can use truncation successfully only when both omission and truncation cause the parser to exhibit the same behavior, unless the elements truncated are fixed length.
This is known as the omission method, in which missing simple elements are represented by an empty sequence of characters between two delimiters.
For example, you define P and C as in the previous example, but set the Delimiter property for P to plus (+). When the same message is received by the broker (all elements of P are present, the first two elements of C are present), the data in the message appears as follows:
P1+C1+C2++P3
Two delimiter characters have been inserted in the message data for the missing elements of complex element C. If the truncation method had been used, the parser would have interpreted the data value P3 as the value of the third element of complex element C and not the third element of complex element P.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ad09490_ |