MRM TDS format: Tagged separation types

For tagged separation types, each data value is preceded by a tag that is specified as an element property.

The Tag Data Separator, or specific Length of Tag parameter is used to determine where the tag ends and the data starts. Different methods are used by each separation type to determine the end of the data.

After considering these two parameters, this topic describes the following supported tagged separation types:

Tagged separation is a flexible format. The elements do not have to occur in a specific order. They do not all need to be present, and can be absent from any point in the message.

Tag Data Separator and Tag Lengths

Either Tag Data Separator and Length of Tag are used by all tagged separation types. But only one of these parameters can be set at the same time.

The point at which a tag ends and data starts can be determined by one of two methods. If the Tag Data Separator is set, then this character indicates where the data ends. For example, the string might be:
tag1:data1
where Tag Data Separator is :
However if the Tag Data Separator is not set and the Length of Tag field is set, then the tag is the specified length, and is immediately followed by the data. No separating character is required. For example, the string might be:
tag1data1
where Length of Tag is 4

Tagged Delimited separation

Tagged Delimited separation is a flexible format. Elements are separated by a predefined delimiter. The textual elements are not of specific lengths. For non-textual elements, the length is determined by the Physical Type of the element. See MRM TDS format: Determining the length of simple data values.

Applicable parameters for Tagged Delimited separation

These parameters are used:
  • Group Indicator indicates the start of a group or complex type.
  • Group Terminator indicates the end of a group or complex type.
  • Delimiter separates the data elements within a group or complex type.
  • Tag for each element, indicates the tag needed to precede the data in that field.
  • Either Tag Data Separator or Tag Length as described earlier in this topic.

Examples for Tagged Delimited separation

If Tag Data Separator is set to :
{tag1:data1*tag2222222:data2*tag333:data3}
where:
  • Group Indicator is {.
  • Group Terminator is }.
  • Delimiter is *.
  • Tag defined for each element, is tag1 (for data1), tag2222222 (for data2), and tag333 (for data3).
or, for example, if Length of Tag is set to 5
{tag11data1*tag22data2*tag33data3}
where parameters are as above, except:
  • Tag, defined for each element (fixed at five characters), is tag11 (for data1), tag22 (for data2), and tag33 (for data3).

Tagged Fixed Length separation

Although Tagged Fixed Length separation is a flexible format, the data must be a specific length. This means that a delimiter is not needed to determine the end of each element.

Applicable parameters for Tagged Fixed Length separation

These parameters are used:
  • Group Indicator indicates the start of a group or complex type.
  • Group Terminator indicates the end of a group or complex type.
  • Tag for each element, indicates the tag needed to precede the data in that field.
  • For each textual element, Length or Length Reference indicates the length of the data (this value does not include the length of the tag). For non-textual elements, the length is determined by the Physical Type of the element. See MRM TDS format: Determining the length of simple data values.
  • Either Tag Data Separator or Tag Length as described earlier in this topic.

Examples for Tagged Fixed Length separation

If Tag Data Separator is set to :
{tag1:data1tag22222222:data2000tag333:data300}
where:
  • Group Indicator is {.
  • Group Terminator is }.
  • Delimiter is *.
  • Tag, defined for each element, is tag1 (for data1), tag22222222 (for data2000), and tag333 (for data300).
  • Length, defined for each element, is 5 (data1), 8 (data2000), and 7 (data300).
or, for example, if Length of Tag is set to 5
{tag11data1tag22data2000tag33data300}
where parameters are as above, except:
  • Tag, defined for each element (fixed at five characters), is tag11 (data1), tag22 (data2000), and tag33 (data300).

Tagged Encoded Length separation

This method has both a tag and a length field before the data. The length field indicates to the parser the length of the data following it.

The length of this length field is itself defined in the Length of Encoded Length parameter. Extra lengths to be added in this, such as the length of the field itself, is set in the Extra Chars in Encoded Length parameter.

Only textual elements and elements with a Binary logical and physical type are supported within a Tagged Encoded Length separation.

These examples show how the values set in these parameters are applied:

  • tagA007dataAAAtagB006dataBBtagC009dataCCCCC

    If Length of Tag is 4, Length of Encoded Length is 3, Extra Chars in Encoded Length is 0, then in this bit stream, TagA is followed by the three character long length field. This indicates that the following data (dataAAA) is seven characters long. The next field, tagB is then considered, and so on.

  • tagA012dataAAAAAtagB010dataBBBtagC016dataCCCCCCCCC

    If Length of Tag is 4, Length of Encoded Length is 3, Extra Chars in Encoded Length is 3, then in this bit stream, TagA is followed by the three-character length field. This indicates that the following data, plus extra characters, is 12 characters long: length of the length field (3) + length of data (9) = 12. Therefore the length of the actual data is only 12-3 = 9. The next field, tagB is then considered, and so on. In each case the length given in the bit stream is 3 greater than the actual length of the data.

Applicable parameters for Tagged Encoded Length separation

These parameters are used:
  • Group Indicator indicates the start of a group or complex type.
  • Group Terminator indicates the end of a group or complex type.
  • Tag for each element, indicates the tag needed to precede the data in that field.
  • Length of Encoded Length indicates the length of the length field in the bit stream.
  • Extra Chars in Encoded Length indicates how many extra characters should be included in calculating the value for the length field in the bit stream.
  • Either Tag Data Separator or Tag Length as described earlier in this topic.

Examples for Tagged Encoded Length separation

If Tag Data Separator is set to :
{tag1111:008data1tag222222222:010data2AAtag3333:009data3A}
where:
  • Group Indicator is {
  • Group Terminator is }
  • Length of Encoded Length is 3
  • Extra Chars in Encoded Length is 3
  • Tag, defined for each element, is tag1111, tag222222222, tag3333, and so on
or, for example, if Length of Tag is set to 5
{tag11008data1tag22010data2AAtag33009data3A}
where parameters are as above, except:
  • Tag, defined for each element (fixed at five characters), is tag11, tag22, tag33, and so on