Reading XML file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ankita
Participant
Posts: 57
Joined: Sun Nov 13, 2005 11:17 pm

Reading XML file

Post by ankita »

Hi All,

I have created a simple job to extract data from xml file and loaded it into sequential file. For e.g, if source is as below,
<Customer>
<FName>
Titi
</FName>
<LName>
Maiti
</LName>
<FName>
Arup
</FName>
<LName>
Roy
</LName>
</Customer>
Then output should be as,
Titi,Maiti
Arup,Roy

But the jobs is creating o/p as,
Titi,
Maiti
Arup,
Roy

As per my understanding, it's passing the newline as in the xml file. Though job stat shows 2 records. Can anyone please help me to format the output properly ?

Thanks in advance !
Ankita
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, the newline is simply part of the data when your input file is formatted like that. Strip them from the field in your job using Convert() and CHAR(13).
-craig

"You can never have too many knives" -- Logan Nine Fingers
ankita
Participant
Posts: 57
Joined: Sun Nov 13, 2005 11:17 pm

Post by ankita »

Thanks chulett ! It has solved the problem.
Post Reply