Page 1 of 1

Sequential file at the output of xml stage

Posted: Tue Jan 07, 2014 2:20 pm
by soumya5891
I have a job like the following.

1. Extracting data form a xml file using a sequential file staging where the whole xml data is being read into a single column.
2. Parsing the xml by using new xml stage in datastage 8.5(the DS version where I developed the job).
3. Write the parsing records into one dataset.

After parsingn the xml I'm getting two records in the dataset which is actual. But when I'm using sequential file stage instead of datastage in the target then only one recor is showing when checking the data by using View Data.

Is there any proper reason for this type of behaviour of the stages?

Posted: Tue Jan 07, 2014 4:01 pm
by MrBlack
I had a hard time following your setup. So the job looks something like this?

[Seq File] -> [XML Input] -> [Database]

And in the sequential file there's a column that is XML text. You use that column as the data source of the XML input?

And your question is, the XML string has two rows of data within the XML tags but when you do "View Data" in the sequential stage, you see just one row? Did I understand you correctly?

Posted: Fri Jan 10, 2014 1:47 pm
by soumya5891
Yes, your understanding is absolutely fine, but have used the new xml stage which was introduced in 8.5.

Posted: Sat Jan 11, 2014 9:47 pm
by eostic
Are you always seeing two rows leaving xml stage? If so, compare also to Peek, to be certain of what is going down those rows.

Ernie

Posted: Mon Jan 13, 2014 1:55 am
by soumya5891
When I'm using dataset I can see the two rows properly in the dataset when am doing view data. But same is showing one record when using sequential file stage. Now as per your suggestion I will place a peek and will see the recs in the log ,how it's coming

Posted: Mon Jan 13, 2014 5:47 am
by eostic
Also. Stop using "view data" when debugging this. Look at the sequential file using another editor. Your issue could simply be with view data. What are you getting in your sequential file.

Ernie

Posted: Mon Jan 13, 2014 11:49 am
by soumya5891
I got the clarification. Did one basic mistake. One of the field value was becoming null after xml parsing that's why that records are getting dropped in the sequential file.

Thanks a lot Ernie for your help and support.I'm marking it as resolved.