MRM TDS format

The Tagged/Delimited String format (TDS) is the physical representation of a message that has a number of data elements separated by tags and delimiters.

Tip: In Version 8, when modeling and parsing general text or binary data, use message model schema with the DFDL domain, instead of message sets and the MRM domain.

The TDS physical format is designed to model messages that consist of text strings, but it can also handle binary data. Examples of TDS messages are those that conform to the ACORD AL3, EDIFACT, HL7, SWIFT, or X12 standards. The TDS physical format allows a high degree of flexibility when defining message formats, and is not restricted to modeling specific industry standards; therefore, you can use the TDS format to model your own messages.

TDS message characteristics

There are a number of features of text string messages that are common to many formats. This is an overview of the main features that are supported by the TDS physical format:

Tags
The text strings in the message can have a tag or a label preceding the data value. The tag is a string that uniquely identifies the data value. The TDS format allows you to associate a tag with each element when you define the element.
Delimiters and tagged data separators
The message can contain various special characters or strings in addition to the tags and text string data values. The TDS format supports a number of different types of special characters or strings.

Some messages have a special character or string that separates each data value from the next. In the TDS format this is a known as a delimiter.

In formats that have a tag before each data value, the tag can be separated from its data value by a special character or string. In the TDS format this is known as a tag data separator.

Group indicators and terminators
A message can be split into a number of substructures in a similar manner to a COBOL or C structure. You can model each of these substructures separately by defining groups, complex types, or elements for each one.

A substructure can have a special character or string that indicates its start within the data. This is known in the TDS format as a group indicator.

A substructure can also have a special character or string that indicates its end in the data. In the TDS format, this is known as a group terminator.

A group indicator and group terminator can also be defined for the whole message. Group indicators and group terminators are optional for the message and each substructure.

Fixed-length strings
Some text strings within a message can be of fixed length; therefore, a delimiter between each data value is not necessary. This is supported by the TDS format.
Fixed-length tags
Some tags can be defined as fixed length; therefore, a tag data separator is not necessary.
Separation types
The TDS property that controls the way text strings are separated is Data Element Separation. It has several options, for example, whether tags are used, whether strings lengths are fixed or variable, and what types of text strings are permitted.

The substructures within a message can use different types of data element separation and use different special characters. Therefore the TDS format allows you to define different types of data element separation and special characters for each complex type within the message.

Regular Expressions
If you choose the Use data pattern option for Data Element Separation, you can use regular expressions to identify parts of the message data to be assigned to sub fields. This is done by setting the regular expression in the Data Pattern property.

The following diagram shows an example data message with each of its components labeled.

This diagram shows an example data message with each of its components labeled.
  • At the top level, each data value has a tag associated with it, each tag is separated from its data value by using a tag data separator of colon (:), and the data values are separated from each other using the asterisk delimiter (*).
  • The group indicator for the message is the left brace ({) and the group terminator is the right brace (}).
  • The data values Data2 and Data3 are in a substructure in which there are no tags, and each data element is separated from the next using the plus delimiter (+). The group indicator for this substructure is the left bracket ([) and the group terminator is the right bracket (]).
  • The data values Data4 and Data5 are in a substructure in which the values are fixed length, and are therefore not separated by a delimiter. The group indicator for this substructure is the less than symbol (<) and the group terminator is the greater than symbol (>).