Capturing reject record with new xml stage

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
Himani
Premium Member
Premium Member
Posts: 10
Joined: Thu Oct 28, 2004 12:06 am

Capturing reject record with new xml stage

Post by Himani »

Dear ALL,
I am using new xml stage in DS 8.5 for processing large amount of data
but I 'm facing problem with rejections

eg My file structure
is <txml>
<order_status>
<Order>1</Order>
<Order_date>2000-10-10</Order_date>
<Order_Quantity>2 </Order_Quantity
</order_status>
<order_status>
<Order>2<Order>
<Order_date>2000-10-11</Order_date>
<Order_Quantity>21</Order_Quantity
</order_status>
</txml>
Now the problem is second <order_status> message is invalid as order tag is not being closed but first one is valid , so I need to reject the second order_status message but need to process the first one ,How I can acheive this in xml stage because If I 'm using switch step to capture the invalid records its rejecting the whole file


Thanks,
Himani
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hard to say whether you can control this, because this one is truly not-well-formed xml as opposed to "invalid" based on schema.

The root element you selected is probably going to dictate the context of parsing and the scope of the rejection. Try "chunking" just that node (right mouse in the parser step where you select the root and see the tree....and then pass that chunk to another xmlParser step to perform your rejection work........though it might reject it anyway before it gets to this chunking logic.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply