There are a number of features of text string messages that 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 workbench.
- 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 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 sub-fields. This is done by setting the regular expression in
the Data Pattern property.
See Using regular expressions to parse data elements for further
details.
The figure below illustrates the tags and special characters in a
TDS message, showing an example data message with each of its components labeled.