XML Output stage

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
pranay
Participant
Posts: 20
Joined: Mon Jan 09, 2006 3:34 pm

XML Output stage

Post by pranay »

Hi All,
This is the first time i am trying to create a xml file using datastage.
For testing i tried making the following job
txt file ------> Transformer ---------> XML Output stage.
I just gave one column in the input as well as in the XML output stage.
The job ran fine with no errors or warnings, but it did'nt created any file. By error logs also its not clear what went wrong. I am Datastage server edition on Unix.
Can anybody help me solve this.
Pranay
Seatte, WA
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The doc is pretty good in this area, so please review it....but in brief, for a simple example, have the input link to your XMLOutput stage put in a couple of columns (let's say a, b, c, d, e) and put the following into the Description attributes of each....

a /myXML/Rows/testRow/@a
b /myXML/Rows/testRow/b/text()
c /myXML/Rows/testRow/c/text()
d /myXML/Rows/testRow/d/text()
e /myXML/Rows/testRow/e/text()

Where the stuff in slashes above is what goes into the Description.

On the output, for testing you can specify a file, although I prefer to send out a single column:

myXMLStuff varchar 999 /

Where it has a single '/' in the Description attribute. Send it to a Sequential Stage and put 000 in the delimter and quote character of the format to get a nice clean XML file.

You have lots to learn about the stages, but this should give you a good start.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

I had a lot more space between the a, b, c, d, e and the first slash when i made that entry.....the / should start each string in the Description.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code tags are for this kind of thing. :wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you say "Code tags preserve whitespace" boys and girls? I knew you could. :wink:

(need to put that on a license plate frame or something)
-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, but there are sometimes "other_____ways" to seem to achieve the same thing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pranay
Participant
Posts: 20
Joined: Mon Jan 09, 2006 3:34 pm

Post by pranay »

Thanks everybody for the reply.
if someone has the xml guide, can u send it to me.
Pranay
Seatte, WA
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you mean the 'Best Practices' document, you can download that from Kim Duke's site:

http://www.duke-consulting.com

Tips & Tricks page.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply