Originally posted by: SystemAdmin
The structure of the XML document must match the structure of the COBOL Copybook. If an XML object occurs multiple times, it usually needs to be mapped to a corresponding Group in the copybook. Sometimes you need to manually modify the copybook, e.g., if you need to create multiple Report Groups and the the copybook desribes a single Report, create a ReportGroup consisting of multiple Reports in the copybook type tree.
As was pointed out, you will need to use Functional Maps. This is a looping control used in a target object that can occur multiple times. Thus, if your XML source contains multiple line items named Item, you could use a map rule like "CreateLineItems(Item:XMLDoc, INDEX($))" You then right click on the map rule and use the FUnctional Map Wizard to create the FMap where you can add additional map rules. The FMap will execute once for each Item:XMLDoc in the source data. The optional INDEX($) passes a loop counter for use in things like a line item number.
See if you can locate a copy of the Design Studio Tutorial, 1027.pdf. It shipped with earlier versions of Mercator and perhaps DataStage TX. Unfortunately it's not part of the latest WTX distributions. Possibly IBM Support can supply you with a copy or you can "borrow" a copy from someone. It's a copyrighted document so I can't just make a copy for you.
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender