Example 3 Export file and import file with OCCURS DEPENDING

This program first writes (or exports) an XML document file from the content of a COBOL data item. Then the program reads (or imports) the same XML document and places the content in the same COBOL data item.

This program is very similar to Example 1 Export File and Import File. However, the data item has been modified so that an OCCURS DEPENDING clause is present.

This example uses the following XML statements: