Creating XML Files in Datastage

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
abdul.malique
Participant
Posts: 2
Joined: Thu Jul 20, 2006 9:59 am
Location: LONDON

Creating XML Files in Datastage

Post 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
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
abdul.malique
Participant
Posts: 2
Joined: Thu Jul 20, 2006 9:59 am
Location: LONDON

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
Last edited by chulett on Sat Jul 22, 2006 7:30 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, Abdul is not a particularly Scottish-sounding name! :lol:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply