WebSphere Message Brokers
File: ad00812_
Writer: Terry Cowling

Concept topic

This build: July 31, 2007 21:21:46

TDS format: Delimited separation types

For delimited separation types, a delimiter is used to separate data fields, but there are no tags present. The data fields need to be given in the correct order in the bit stream and elements cannot be omitted from the middle of the bit stream.

The All Elements Delimited separation type means that data fields are delimited by a pre-specified character or string. In this example, four data fields are separated by an asterisk (*) delimiter:
data1*data2*data3*data4
Delimited separation types are restrictive in the ordering and presence of elements:
After considering Delimiter suppression and truncation rules, this topic describes the following delimited separation types:

Delimiter suppression and truncation rules

All Elements Delimited

In an All Elements Delimited separation type, all elements are separated by a delimiter; none are determined by their length. For example:
data1*data2*data3*data4*data5
where Delimiter is *

Applicable parameters

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.
  • Delimiters separate the data elements within a group or complex type.
  • Suppress Absent Element Delimiters indicates whether delimiter suppression is permitted (see below).

All Elements Delimited makes no use of tags or their associated parameters. Lengths are also ignored.

For example:
{data1*data22222*data3}
where:
  • Group Indicator is {
  • Group Terminator is }
  • Delimiter is *

Repeating element rules

If an element needs to be repeated in a type of All Elements Delimited, then the Repeating Element Delimiter (RED), is used to separate the repeated elements.

For example if data2 repeats 5 times:
data1*data2:data2:data2:data2:data2*data3*data4
where:
  • Delimiter is *
  • Repeating Element Delimiter is :
If the Suppress Absent Element Delimiters field is set to End of Type, then you can use delimiter suppression. So if, in the above example, only the first data2 element was present, then the bit stream reads:
data1*data2*data3*data4
However, if the Suppress Absent Element Delimiters field is set to Never, then the bit stream reads:
data1*data2::::*data3*data4
If the delimiter and RED match, then two delimiters are output to indicate that the repeat is ending. So if the delimiter and RED are *, then the bit stream reads:
data1*data2**data3*data4

Variable Length Elements Delimited

In a Variable Elements Delimited separation type (also known as Delimited and Fixed separation type) some elements are determined by their length, while others are delimited. It is really a combination of a delimited and a fixed length format, and follows rules associated with both. Lengths can be given and used, but they are not mandatory.
  • If a length is present for an element, then it is used, and a delimiter is not needed to terminate that element. The element must be padded to the correct length, and cannot exceed that length.
  • If no length is given, then the delimiter is required.

A Variable Elements Delimited separation type containing only variable length elements resembles an All Elements Delimited type. If it contains only fixed length elements, it resembles a Fixed Length type.

For example:
data1*data2*data3*data4000data5
where:
  • Delimiter is *
  • data4 has a length of 8

Applicable parameters

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.
  • Delimiters separate the data elements within a group or complex type.
  • Suppress Absent Element Delimiters indicates whether delimiter suppression is permitted.
  • (Optionally) one of Length or Length Reference indicates the length of an element. If an element has a length, then this length is used. As the length of this element is known, it is then not necessary to output a delimiter after it. If the length is not known, then an element is required.
In this example, the fourth field (containing data4) is of fixed length 8 and its padding character is 0:
{data1*data22222*data3*data4000data5}
where:
  • Group Indicator is {
  • Group Terminator is }
  • Delimiter is *

Repeating element rules

The action of a repeating element in a Variable Elements Delimited environment is dependent on the minimum and maximum number of repeats and whether the element has a length.

Delimited Element Repeating

If a delimited element (that is, an element with no length) is repeated, then a Repeating Element Delimiter (RED) is required and the rules for All Elements Delimited are followed. A delimiter is therefore required after the last repeat. Delimiter suppression of this repeat can also occur.

For example, if data2 is repeating:
data1*data2:data2:data2:data2:data2:data2*data3*data4000data5
where:
  • Delimiter is *
  • Repeating Element Delimiter is :
  • data4 has a fixed length of 8

If the Suppress Absent Element Delimiters field is set to End of Type then you can use delimiter suppression.

If in the above example only the first data2 is present:
data1*data2*data3*data4000data5
However, if Suppress Absent Element Delimiters is set to Never, then the bit stream reads:
data1*data2:::::*data3*data4000data5
If the delimiter and RED match, then two delimiters are output to indicate that the repeat is ending. So if the delimiter and RED are both *, then the bit stream reads:
data1*data2**data3*data4

This also applies for a non-fixed length complex type or group inside a Variable Elements Delimited environment.

Fixed Length Element Repeating

If an element with a defined length (a fixed length element) is repeating and the minimum occurrences is not the same as maximum occurrences, then an RED is not required, but a delimiter is required after the last repeat. Delimiter suppression of this repeat can occur.

For example, if data4 (with a fixed length of 8) is repeating, and its minimum occurrences is 2, maximum occurrences is 4:
data1*data2*data3*data400data400data400data400*data5
where Delimiter is *
Or, if there are only two occurrences of data4:
data1*data2*data3*data4000data4000*data5

If an element with a defined length (a fixed length element) is repeated, and the minimum occurrences is the same as maximum occurrences, then an RED is not required. A delimiter is also not required after the last repeat. Truncation of this repeat cannot occur and all elements need to be present.

For example, if data4 (with a fixed length of 8) repeats four times:
data1*data2*data3*data4000data4000data4000data4000data5
where Delimiter is *
Or, if there are only two occurrences of data4:
data1*data2*data3*data4000data40000000000000000000data5

This also applies for a non-fixed length complex type or group inside a Variable Elements Delimited environment.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:21:46

ad00812_ This topic's URL is: