Page 1 of 1

Creating XML Files in Datastage

Posted: Thu Jul 20, 2006 10:56 am
by abdul.malique
Hi,

I have just started working with the XML stages in DATASTAGE and I am trying without much sucess to create a XML output file that conforms to the following simplified structure:

<ROOT>

<CUSTOMER>
<ORDER>
</ORDER>
<ORDER>
</ORDER>
<ORDER>
</ORDER>
<ORDER>
</ORDER>
</CUSTOMER>

<ROOT>

I have 2 source of Customers and Orders and a customer can have many orders upto anything from 1-100 but I am unable to create multiple nested ORDERs child elements under one parent CUSTOMER.

The best I have been able to produce so far is multiple files of the following structure:

<ROOT>

<CUSTOMER>
<ORDER>
</ORDER>
</CUSTOMER>

<ROOT>

Has anyone been able to create this format, if so please could you give me a few pointers!

Many Thanks

Ab

Posted: Thu Jul 20, 2006 2:35 pm
by Amos.Rosmarin
Hi Abdul,

It is posible to create thisa file and not so complicated, the problem is that it is not easy to explain it in the forum.
So just some tips for you to starts with...

In the Datastage installation CD there is a directory called XML. 1 (or somthing like that) it contains some sample jobs + a ppt with explenations.
Create a new project and install the XML 1 pack in it including the sample jobs (it comes as an exe).
(XML pack V1 and V2 don't live happy togather so make sure it is a seperate project)
Ther is a diif between XML pack V1 and V2 but the sample jobs will halp you learn the pack since the concept is the same.

HTH,
Amos

Posted: Thu Jul 20, 2006 2:38 pm
by chulett
I don't think you need to install the Version 1 pack. Check and see if you have the XMLPACK_20_Designer.pdf manual in your Docs directory. It will educate you on techniques for using the XML stages to read and write XML, plus has some 'advanced' topics as well.

Posted: Fri Jul 21, 2006 9:48 am
by abdul.malique
:D Many thanks for the suggest, I am no able to create XML output inline in line with the requirement.

Thanks

Abdul

Posted: Fri Jul 21, 2006 10:55 am
by chulett
I'm assuming 'I am no able' actually means 'I am now able'. :wink:

Care to share any words of wisdom, what worked for you, things that would help a fellow searcher who had the same problem and found your post?

Posted: Sat Jul 22, 2006 12:48 am
by ray.wurlod
Yes, Abdul is not a particularly Scottish-sounding name! :lol: