This example shows a Flat File Schema that parses a repeating set of records using groups. Each set of the repeating record contains records of different types as shown in the following example input Flat File data:
In this example data, the first, second, and third records of the repeating set are each a different type of record. In addition, this example shows how types stored in the Type Library tab are used in a Flat Files Schema. In this example, you view and test an existing Flat File Schema rather than creating the Flat File Schema from scratch.
To open, view, and test the Flat File Schema used to parse the input data displayed in Figure 1:
C:\Documents and Settings\myLogin\My Documents
Where myLogin represents your Windows login name.
C:\Program Files\IBM\WebSphere Cast Iron Studio 3.X\Samples\FlatFileSchema
C:\Program Files\IBM\WebSphere Cast Iron Studio 3.X\Samples\FlatFileSchema
The first record of the vegPO Flat File Schema is a header record called orderingStore that occurs only once. In the Schema Layout tab, the fields and record that make up the orderingStore record display as children. This first line is parsed into the fields and records that make up the orderingStore record.
After the first header record, the sets of repeating elements start. Each set of repeating elements contains three child records of different types as shown in the following figure:
A repeating record that contains child records of different types can be modeled in the Flat File Schema Editor using groups. Groups are only required when the data does not provide any additional delimiters or structure to clearly mark the beginning and end of repetitions that contain more than one record. The delimiters for the repetitions are inherited from the parent record or root node. In this example for the vegPO root node, the repeat delimiter is set to end-of-line. The orders group node uses end-of-line delimiter to parse its repeating records
The following icon represents a record that is based on a record type:
The orders group with the order group type define a set of repeating records of different records because of the following characteristics: