Page 1 of 1

Incomplete/Truncated/Ill formed XML Elements.

Posted: Tue Jun 27, 2006 11:53 pm
by pavankvk
Hi

i am using XMLOuptut stage to produce xml documents.

Is there a bug with the stage?

the problem is some of the xml elements are trucated/ill formed and truncated.

here is what it looks like

Correct :
<BusPhoneGrp><BusPhoneNbr>7703214789</BusPhoneNbr><BusPhoneType>BUS</BusPhoneType><BusPhoneStatus>A</BusPhoneStatus></BusPhoneGrp>

Problematic :
<BusPhoneGrp><BusPhoneNbr>7705220847</BusPhoneNbr><BusPhon

As shown above the BusPhoneGrp node is truncated.

this behavior is say couple of them for every 100 records i guess..

any ideas?

Posted: Tue Jun 27, 2006 11:55 pm
by pavankvk
i already opened a ticket with IBM..just wondering if this is a known issue..or am i doing anything wrong??

Posted: Wed Jun 28, 2006 6:01 am
by chulett
:!: For anyone wanting to help: To put this into perspective, please go through this exchange so you understand how the XML is being generated.

I really don't think this is a bug but more likely a problem in the job design, specific to the need to use a Sequential File stage as your final output. But that would be hard to nail down without having one's hands on your job and probably your source data as well. Hopefully Support asked for something like that when you opened your ticket with them.

Are you sure it's not something simple like your XML 'files' being longer than your defined max record length in the Sequential stage? I'm assuming you have 'Formatted Output' turned off in your output link, yes?

Posted: Wed Jun 28, 2006 9:32 am
by pavankvk
Craig,

i checked the output. the output had around 2000 records and a few of them had this problem.

i used the target type as varbinary with 8000 bytes length.thats more than enough for my data.

i also dumped the same data to a flat file and compared.

for 2 similar sets of data, one is having a properly generated XML and other is not having.

i am yet to hear from the support.

i can send you the source data and job design. let me know.

Posted: Wed Jun 28, 2006 9:51 am
by pavankvk
chulett wrote::!: For anyone wanting to help: To put this into perspective, please go through this exchange so you understand how the XML is being generated.

I really don't think this is a bug but more likely a problem in the job design, specific to the need to use a Sequential File stage as your final output.
The overall requirement is like this. each transaction should be a complete XML document. and since we cannot have n numbre of documents, we write each xml transaction to a sequential file.Another process reads each line in that file as a XML document and processes further.

also i had the key element written properly. so the next time, i only read from my source this key element and tried to generate one single line of XML and it generates fine.

and also its not a particular set of data thats causing the problem. its pretty random.

All the examples i read about XMLOutput stage were using server jobs. i am just wondering if it supports only server jobs?all my jobs are parallel and i do see these stages in the pallette.i will post you the updates after i hear from the support.