A repeating field or structure is anathema in a relational
database but commonplace in VSAM files.
A number of different approaches can be considered
for implementation in CICS® VT:
- If there is a single repeating field, each element can be a separate
column with a numeric suffix. If this DB2® design
is acceptable, no exits are required and the file can be mapped very
quickly using the automated mapping facility. Be aware that the maximum
number of columns in a single table is limited by DB2 to 750.
- The entire array structure can be mapped as either a single DB2 column, a series of columns
if the structure size is more than 255 bytes, or a single VARCHAR
column.
- For a repeating group field, each instance can be a separate row
in an additional table. This is the only normalized design.
There are obvious limitations with the first two approaches although
their advantages is that the data is migrated to a single table and
the migration effort is minimized. The runtime performance is also minimized because
data is processed in a single I/O operation.