A number of features of text string messages are common
across many formats. The following sections give an overview of the
main features that are supported by the TDS wire format:
- 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 in the IBM® Integration Toolkit.
- 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.
- A message can be split into a number of substructures in a similar
manner to a to COBOL or C structure. You can model each of these substructures
separately by defining complex types or elements for each one. Complex
types and elements are described in Message model objects. 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.
- Some text strings within a message can be of fixed length, so
a delimiter between each data value is not necessary. This is supported
by the TDS format. If you use a fixed length tag, a tagged data separator
is not required.
- The TDS property that controls the way text strings are separated
is Data Element Separation.
It has several options that let you choose, for example, if tags are
used, if strings lengths are fixed or variable, and what types of
text strings are permitted. See Message Sets: Specifying data element separation methods to model a message.
- 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.
- If you use the Use Data
Pattern method of Data
Element Separation, you can use regular expressions to
identify parts of the message data to be assigned to subfields. This
is done by setting the regular expression in the Data Pattern property. See Message Sets: Using regular expressions to parse data elements for further details.
The following figure illustrates the tags and special characters
in a TDS message, showing 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 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 delimiter plus (+). 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 (>).
The following sections describe data element separation and
the special characters in more detail: