CICS / WebSphere

How Many Containers?

When using the Web Services Assistant, for each first-level variable array (i.e., an OCCURS DEPENDING ON that isn’t defined in another OCCURS DEPENDING ON), CICS will remove all the table data from the data layout and place it into a separate container; it will remove the field definitions from the COBOL data definition copybook, replacing them with fields containing the number of entries in the table and the name of the new container.

For each second-level variable array (i.e., an OCCURS-DEPENDING-ON that’s defined in another OCCURS DEPENDING ON), CICS will remove all the table data from each entry of the defining table and place it into a separate container; it will remove the field definitions from the COBOL data definition copybook, replacing them with fields containing the number of entries in the table and the name of the new container. So, for each first-level variable array table entry, there will be one second-level variable array container.

In the first example, there was one variable table (MY-TABLE) that was defined in the group DATA-AREA, so the Assistant created a container to hold the table entries and added control information to describe the container to the DATA-AREA group.

In the second example, the new variable table (NESTED-MY-TABLE) was defined in the group MY-TABLE, so there’s an instance of NESTED-MY-TABLE for each entry of MY-TABLE. In this case, the Assistant will create a unique container to hold an instance of NESTED-MY-TABLE for each entry in MY-TABLE and place the appropriate control information in the NESTED-MY-TABLE table entry.

In this case, the number of containers will equal the number of entries in the NESTED-MY-TABLE (i.e., the value in SECOND-NUMBER-OF-ENTRIES plus one for the container holding the original MY-TABLE data entries).

Conclusion

Although CICS Web Services Assistant support for variable array data initially appears to be unwieldy and difficult to manage, the process is remarkably easy to manage.

When accepting input from the Web, the programmer can simply create a few brief routines to populate the existing data definitions from the multiple containers that the Assistant provides, allowing the actual business logic to remain as coded.

When creating output that will be processed by the Assistant, once again, a few routines to create the required containers and populate them from the existing data definitions will minimize the coding effort required.

 

3 Pages