Is it possible to use XML GENERATE to create XML with multi-level nested elements of different sizes?
For example:
01 SOURCE-REC.
05 REPEATING-PARENT OCCURS 5 TIMES.
10 PARENT-NAME PIC X(7).
10 CHILD-COUNT PIC 9.
10 REPEATING-CHILD OCCURS 1 TO 5 TIMES
DEPENDING ON CHILD-COUNT.
15 CHILD-NAME PIC X(6).
Compiling this using Enterprise Cobol v4.1 yields:
IGYGR1263-S "OCCURS DEPENDING ON" object "CHILD-COUNT" was defined as a table element. The "DEPENDING ON" phrase was discarded.
IGYGR1116-S The "DEPENDING ON" object for table "REPEATING-CHILD" was invalid. The "DEPENDING ON" phrase was discarded.
Not all parents are going to have the same number of children. How can this be addressed?
Edit: I suppose at its heart, this isn't really an XML question. I hit a wall just trying to build the working storage that I later hope to feed into XML GENERATE.