Reading xml files

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
aluthra48
Participant
Posts: 66
Joined: Thu Mar 05, 2009 9:59 am

Reading xml files

Post by aluthra48 »

Hello
I have an xml file as follows:
<?xml version="1.0"?><QuantumViewResponse><Response><TransactionReference><CustomerContext>Test XML</CustomerContext><XpciVersion>1.0007</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription><Error><ErrorSeverity>Warning</ErrorSeverity><ErrorCode>336000</ErrorCode><ErrorDescription>The follow</ErrorDescription></Error></Response><QuantumViewEvents><SubscriberID>kschrank</SubscriberID></QuantumViewEvents></QuantumViewResponse>

The parallel job has been defined as seq file ----->xml input stage ----> peek stage. The seq file stage Output/Properties tab/Read method = specific File. Format/Record level/RecordType = implicit, Format/Field Defaults/delimiter=none, columns = single column sqltype = longnvarchar and length 9999.
When I "view data" I see 2 rows. However, if I reduce the length of the xmlfile input to less than 512 characters, I see one row.
This is just a test. In reality, I will be reading an xml file that maybe as long as 15000 characters. What am I doing wrong?

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

Post by chulett »

Don't use the Sequential File stage but rather the External Source stage as noted here in Dr Ostic's Sing-Aong Blog. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
aluthra48
Participant
Posts: 66
Joined: Thu Mar 05, 2009 9:59 am

Post by aluthra48 »

Works like a charm. I going to experiment some more, and then start working on the real file rather than the test file I created.
Thank you so much
Post Reply