Page 1 of 1

XML Output stage

Posted: Tue Aug 26, 2008 7:43 pm
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.

Posted: Tue Aug 26, 2008 8:00 pm
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

Posted: Tue Aug 26, 2008 8:01 pm
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

Posted: Tue Aug 26, 2008 8:07 pm
by ray.wurlod
Code tags are for this kind of thing. :wink:

Posted: Tue Aug 26, 2008 11:42 pm
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)

Posted: Wed Aug 27, 2008 12:03 am
by ray.wurlod
Yes, but there are sometimes "other_____ways" to seem to achieve the same thing.

Posted: Tue Sep 02, 2008 4:50 pm
by pranay
Thanks everybody for the reply.
if someone has the xml guide, can u send it to me.

Posted: Tue Sep 02, 2008 5:41 pm
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.