xml input

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
Lovesh_Patni
Premium Member
Premium Member
Posts: 13
Joined: Fri Jun 22, 2007 1:29 am
Location: Perth

xml input

Post by Lovesh_Patni »

Hi,

I'm trying to read xml file and write it into text file using
folder stage ->xml input -> transformer->Seq file.
Job finishes successfully but when i try to open the seq file data looks in b elow format

10
,
20
,
80
.I want the output to be like
10,20,80
2nd record
..............
Here is the Input xml file format
<import>
<row>
<a>
10
</a>
<b>
20
</b>
<c>
80
</c>
</row>
</import>

Please let me know what nees to be done to fix this
Lovesh Patni
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is a vertical pivot. Search DSXchange for techniques - at least three methods exist for server jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There may be something else odd going on here also..... seems there might be a CRLF actually in your data. You might want to try using some ereplace functions in a transformer and changing all char(13) and char(10)'s [hex 0D's and hex 0A's] to blanks [char(20)] before writing to your target.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Lovesh_Patni
Premium Member
Premium Member
Posts: 13
Joined: Fri Jun 22, 2007 1:29 am
Location: Perth

Re: xml input

Post by Lovesh_Patni »

Thanks for your quick response.
After making below changes its working now.

When I'm wirting the xml file using xml output stage,i have unchecked the option of generate formatted output and it resulted the file in below format
<import><row><a>10</a><b>20</b><c>30</c></row></import>.

When reading this file using xml input stage I'm getting the output in desired format

10,20,30
Lovesh Patni
Post Reply