I am using the XML stage in DS 8.5 and I can not find a solution for this problem - hopefully one of you can help:
My input is a single stream with data - a little simplyfied it is:
Workgroup lastname firstname city citycode telephone
A single person can have muliple adresses (cities and city codes) as well a s multiple telephone numbers. The number of adresses differ from the number of telefone numbers.
Because I have only a single input stream I use REGROUP steps to get to following structure:
Code: Select all
<Workgroup>
<Employee>
<Lastname>Smith</Lastname>
<Firstname>Tom</Firstname>
<Adress>
<City>Munich</City>
<CityCode>81707</CityCode>
</Adress>
<Adress>
<City>Berlin</City>
<CityCode>12345</CityCode>
</Adress>
<Communication>
<Telephone>030/123456</Telephone>
</Communication>
<Communication>
<Telephone>0172/9822776</Telephone>
</Communication>
<Communication>
<Telephone>+49 175/9998833</Telephone>
</Communication>
</Employee>
...
</Workgroup>
My problem is to get the Communication and Adress - which are on the same level - both beyond employee - done rigth within the REGROUP steps.
Because the communication and adress are independed from the number of appearances I do not know how to configure the REGROUP step.
For example if I do the Adress regroup - City and CityCode are clearly "Childs" but the Communication is not a "Parent" nor a "child" and can not be deleted from the REGROUP.
Any hints for that?
I did not find and information in the redbook or anywhere else and the problem of two substructures on the same level is not a strange thing....
many thanks in advance