Start of change

Support for flattening complex structures

The flattenTables connection property produces a flattened view of a database table. Although the copybook structure in the IMS™ catalog is unchanged, the information about the structure of the table is altered for that particular connection. Enabling the flattenTables connection property can simplify the process of querying a database table.

Complex structures that are displayed according to the flattenTables connection property are formatted according to these naming conventions:
  • Static arrays are referenced by the name of the array, index of the array, and name of the field.

    An example of this convention is CLASSES_2_INST, where CLASSES is the name of the array, 2 is the index of the array, and INST is the name of the field.

  • Only the sub-elements of structures are displayed in the flattened structure view (not the names of the structures themselves).
Restriction: The flattenTables connection property supports static arrays and structures only. Dynamic arrays are not altered.

The following view displays a copybook structure with the flattenTables connection property disabled.

01 SEGM.
   05 CLASSES OCCURS 4 TIMES.
      10 INST PIC X(15).
      10 GRADE PIC X(1).
      10 BOOKS OCCURS 2 TIMES.
         15 AUTHOR.
            20 FIRSTNAME PIC X(10).
            20 LASTNAME PIC X(15).
         15 TITLE PIC X(20).

The following view displays the same copybook structure as in the previous example, but with the flattenTables connection property enabled.

01 SEGM.
   05 CLASSES_1_INST PIC X(15).
   05 CLASSES_1_GRADE PIC X(1).
   05 CLASSES_1_BOOKS_1_FIRSTNAME PIC X(10).
   05 CLASSES_1_BOOKS_1_LASTNAME PIC X(15).
   05 CLASSES_1_BOOKS_1_TITLE PIC X(20).
   05 CLASSES_1_BOOKS_2_FIRSTNAME PIC X(10).
   05 CLASSES_1_BOOKS_2_LASTNAME PIC X(15).
   05 CLASSES_1_BOOKS_2_TITLE PIC X(20).
   05 CLASSES_2_INST PIC X(15).
   05 CLASSES_2_GRADE PIC X(1).
   05 CLASSES_2_BOOKS_1_FIRSTNAME PIC X(10).
   05 CLASSES_2_BOOKS_1_LASTNAME PIC X(15).
   05 CLASSES_2_BOOKS_1_TITLE PIC X(20).
   05 CLASSES_2_BOOKS_2_FIRSTNAME PIC X(10).
   05 CLASSES_2_BOOKS_2_LASTNAME PIC X(15).
   05 CLASSES_2_BOOKS_2_TITLE PIC X(20).
   05 CLASSES_3_INST PIC X(15).
   05 CLASSES_3_GRADE PIC X(1).
   05 CLASSES_3_BOOKS_1_FIRSTNAME PIC X(10).
   05 CLASSES_3_BOOKS_1_LASTNAME PIC X(15).
   05 CLASSES_3_BOOKS_1_TITLE PIC X(20).
   05 CLASSES_3_BOOKS_2_FIRSTNAME PIC X(10).
   05 CLASSES_3_BOOKS_2_LASTNAME PIC X(15).
   05 CLASSES_3_BOOKS_2_TITLE PIC X(20).
   05 CLASSES_4_INST PIC X(15).
   05 CLASSES_4_GRADE PIC X(1).
   05 CLASSES_4_BOOKS_1_FIRSTNAME PIC X(10).
   05 CLASSES_4_BOOKS_1_LASTNAME PIC X(15).
   05 CLASSES_4_BOOKS_1_TITLE PIC X(20).
   05 CLASSES_4_BOOKS_2_FIRSTNAME PIC X(10).
   05 CLASSES_4_BOOKS_2_LASTNAME PIC X(15).
   05 CLASSES_4_BOOKS_2_TITLE PIC X(20).
End of change