DB2 UDB API stage does not rollback

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
michaeld
Premium Member
Premium Member
Posts: 88
Joined: Tue Apr 04, 2006 8:42 am
Location: Toronto, Canada

DB2 UDB API stage does not rollback

Post by michaeld »

I am trying to make DB2 UDB API stage rollback when there is bad data that gets rejected by DB2, but it does not. It just creates a warning and continues inserting the rest of the records.

For examlpe out of 200 records 10 have a bad date. DB2 inserts 190 instread of rolling back to the last successful transaction.

I did this by tring to insert an invalid date to a DB2 table. Instead of aborting the job and rolling back the records that were part of the same array, it just raises a warning and keeps going without rolling back.

Is this a DB2 UDB API stage bug or a setting in the CLI Driver? Any ideas on how to get this to work?

Array size: 50
Transaction commit size: 50
Number of records processed: 200
Driver: [IBM][CLI Driver][DB2/NT]

:?:
Mike
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

(From memory) isn't there a "treat warning as fatal" property or something similarly named? A "fatal" will issue a rollback in addition to aborting the job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
michaeld
Premium Member
Premium Member
Posts: 88
Joined: Tue Apr 04, 2006 8:42 am
Location: Toronto, Canada

Post by michaeld »

I looked for something like that and all I found is the "abort after X warnings" setting when you run a job. But when I set it to 1 then it added an error entry to the log, but the job continued and finished with a status of "Finish with warnings".

I also thought that a message handler might be able to promote it to an error, but it can't. It can only demote it to informational.

thanks for the tip thought. I'll keep looking.
Mike
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Or you can set your job to abort as soon as it gets a warning.
L'arrêt essayant d'être parfait… évoluons.
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Or you can set your job to abort as soon as it gets a warning.
L'arrêt essayant d'être parfait… évoluons.
michaeld
Premium Member
Premium Member
Posts: 88
Joined: Tue Apr 04, 2006 8:42 am
Location: Toronto, Canada

Post by michaeld »

how do I do that?

If it's in the limits section when you run the job then it doesn't seem to work. It puts in a Fatal entry to the log and it continues processing.
Mike
Post Reply