WebSphere Message Brokers
File: ad09900_
Writer: Terry Cowling

Reference topic

This build: July 31, 2007 21:23:38

Using a variable number of repeats

You can use the Data Element Separation method Use Data Pattern to support a variable number of repetitions in an otherwise fixed length environment. However, it relies on the ability to recognize the end of the repetitions based on the data content.

In its simplest form, you can do this by specifying a regular expression Data Pattern that matches a fixed number of characters that is terminated by reaching the end of the message bit stream.

For example, consider a message with one fixed length field (length 10), followed by another fixed length field (length 20) that repeats indefinitely to the end of the bit stream:

Message  Data Element Separation=Use Data Pattern
    FieldA Data Pattern=.{10}
    FieldB Repeat, Min Occurs=1, no Max Occurs, Data Pattern=.{20}

The following example message contains a fixed length field (length 20) that repeats a variable number of times, and is separated from a second field by the string ";". The pattern specifies a string of 20 characters starting with anything except a semicolon:

Message Data Element Separation=All Elements Delimited, Delimiter=;
    SubType1 Data Element Separation=Use Data Pattern
       FieldA Repeat, Min Occurs=1, no Max Occurs, Data Pattern=[^;].{19}
       FieldB

Related concepts
Message modeling
The message model
TDS format: Relationship to the logical model
Related tasks
Developing message models
Working with a message definition file
Working with message model objects
Related reference
Message model reference information
Message model object properties
Additional MRM domain information
Additional TDS information
Notices | Trademarks | Downloads | Library | Support | Feedback

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

ad09900_ This topic's URL is: