Example of syntax objects as components of a type

The following is an example of defining a syntax object as a component of a group type. The following data represents a message received from multiple departments.

Each message is made up of segments. Each department uses different segment delimiters and terminators. The message format specifies that the delimiter and terminator are the first two bytes of the message, followed by the actual data.

To define syntax objects for the delimiter and terminator:

  1. Define two separate syntax objects with an Item Subclass of Syntax, one for the message delimiter and one for the message terminator. Appropriate type names might be SegmentDelimiter and SegmentTerminator.
  2. Define the possible message delimiter values as restrictions of the SegmentDelimiter item type. Define the possible message terminator values as restrictions of the SegmentTerminator item type.
  3. Define these item types as the first two components of the group type Message.
  4. Expand the Delimiter property.
  5. For the variable Delimiter > Item property, select SegmentDelimiter from the drop-down list.
  6. For the variable Terminator > Item property, select SegmentTerminator from the drop-down list.

During the data validation process, the component SegmentDelimiter appears in the data with a value of *. The group type Segment has a variable delimiter specified as the item type SegmentDelimiter, with the value *. Therefore, it is understood that the segment has * as the delimiter.

When the value of a syntax object appears as actual data, it can be mapped as data. For example, source data may use different delimiters from several different sources. Acknowledgments of this data must be sent back to the source using the delimiter used in the original data. This data can be mapped from the input to the output if these syntax objects are defined as components within the data.