Repeating tags in XMl header

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rejith.ry
Participant
Posts: 21
Joined: Thu Jun 08, 2006 3:37 am

Repeating tags in XMl header

Post by rejith.ry »

I want to generate an XML with the following specifications.

1. Header - One/message(STORE).
2. Payload - Multiple employee details.
ie, Multiple employees will be there for STORE


So I am making all the payload field as keys and Header field not.
That is working fine.

Now I want to repeat a particular groups of tags inside the header twice.

ie, the header will remain only one particular set of tags repeat inside.

The sample XML file is pasted below. The repeating tags are shown in bold.


Please help me out if you are familiar with XML output stage.



Regards,

Rejith R



<?xml version="1.0" encoding="UTF-8"?>
<ebo:EBO xmlns:ebo="http://service.gap.com/schemas/EmployeeDataEBO20060530" xmlns:esb="http://service.gap.com/schemas/ESBHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >




<esb:ESBHeader>
<esb:EnvironmentName>SDTDev</esb:EnvironmentName>
<esb:VersionNbr>1.0</esb:VersionNbr>
<esb:BusinessEvent>
<esb:TransactionTypeCode>StaffworksCreate</esb:TransactionTypeCode>
<esb:Description>Employee DB download to Staffworks</esb:Description>
<esb:Timestamp>2006-06-21T06:21:24.000Z</esb:Timestamp>
<esb:EventID>2006</esb:EventID>
<esb:TotalRecordCount>184</esb:TotalRecordCount>
</esb:BusinessEvent>
<esb:SourceSystem>
<esb:AreaID>5006</esb:AreaID>
<esb:StoreNbr>9029</esb:StoreNbr>
<esb:ApplicationName>SDT</esb:ApplicationName>
<esb:InstanceMapID>5006</esb:InstanceMapID>
</esb:SourceSystem>
<esb:RoutingInformation>
<esb:Type>
<esb:RoutingTypeName>INSTANCE</esb:RoutingTypeName>
<esb:Label>
<esb:LabelName>DIVISION</esb:LabelName>
<esb:LabelValueText>5006</esb:LabelValueText>
</esb:Label>
</esb:Type>
</esb:RoutingInformation>
<esb:RoutingInformation>
<esb:Type>
<esb:RoutingTypeName>STORE</esb:RoutingTypeName>
<esb:Label>
<esb:LabelName>STORE</esb:LabelName>
<esb:LabelValueText>457</esb:LabelValueText>
</esb:Label>
</esb:Type>
</esb:RoutingInformation>

<esb:DatasetInfo>
<esb:TotalDatasetCount>4</esb:TotalDatasetCount>
<esb:DatasetNbr>3</esb:DatasetNbr>
<esb:DatasetSizeQty>42</esb:DatasetSizeQty>
</esb:DatasetInfo>
</esb:ESBHeader> /// End of ESB Header



<ebo:EBOPayload>
<ebo:Employee> //details of first employee
<ebo:LastName>Gadhjcb</ebo:LastName>
<ebo:FirstName>Employee</ebo:FirstName>
<ebo:SocialSecurityNbr>1590700</ebo:SocialSecurityNbr>
<ebo:AddressLine1Text>ADDRESS LINE 1~122 Vicarage Rd</ebo:AddressLine1Text>
<ebo:CityName>COUNTY~MDDX</ebo:CityName>
<ebo:ZipCode>POST CODE~TW16 7QX</ebo:ZipCode>
<ebo:PhoneNbr>PHONE NUMBER~01932782670</ebo:PhoneNbr>
<ebo:HireDate>03/15/2005</ebo:HireDate>
<ebo:WageRate>5.85</ebo:WageRate>
<ebo:EmployeeTypeCode>P</ebo:EmployeeTypeCode>
<ebo:PayCategoryCode>H</ebo:PayCategoryCode>
<ebo:HireTypeCode>0</ebo:HireTypeCode>
<ebo:BirthDate>04/11/1981</ebo:BirthDate>
<ebo:StoreNbr>9029</ebo:StoreNbr>
<ebo:StatusCode>A</ebo:StatusCode>
</ebo:Employee>


<ebo:Employee> //details of second employee
<ebo:LastName>Gadhgge</ebo:LastName>
<ebo:FirstName>Employee</ebo:FirstName>
<ebo:SocialSecurityNbr>1590693</ebo:SocialSecurityNbr>
<ebo:AddressLine1Text>ADDRESS LINE 1~64 Flat A Richmond Road</ebo:AddressLine1Text>
<ebo:CityName>COUNTY~SURREY</ebo:CityName>
<ebo:ZipCode>POST CODE~KT2 7LB</ebo:ZipCode>
<ebo:PhoneNbr>PHONE NUMBER~07968542765</ebo:PhoneNbr>
<ebo:HireDate>02/07/2005</ebo:HireDate>
<ebo:WageRate>6.00</ebo:WageRate>
<ebo:EmployeeTypeCode>P</ebo:EmployeeTypeCode>
<ebo:PayCategoryCode>H</ebo:PayCategoryCode>
<ebo:HireTypeCode>0</ebo:HireTypeCode>
<ebo:BirthDate>11/27/1958</ebo:BirthDate>
<ebo:StoreNbr>9029</ebo:StoreNbr>
<ebo:StatusCode>A</ebo:StatusCode>
</ebo:Employee>
</ebo:EBOPayload>
</ebo:EBO>



Post Reply