Fatal Error with succesfull Completion

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
Camaj
Premium Member
Premium Member
Posts: 15
Joined: Wed Sep 15, 2004 9:24 am

Fatal Error with succesfull Completion

Post by Camaj »

Bonjour,

I run the DataStage PX with DB2 in the UNIX system.

I create a job that insert to a DB2 table. When I ran my job twice I got the followed error from DB2 --> DB2 Driver Embedded SQL: -803;
sqlcode = 23505;
sqlstate = SQL0803N One or more values in the INSERT statement, UPDATE statement, or
foreign key update caused by a DELETE statement are not valid because the
primary key, unique constraint or unique index identified by "1" constrains.

When I check in the DIRECTOR log I saw 2 FATAL error. This is normal I tried to insert row already in the table.

My problem is that my job completed with "succesfull".

Wich option I have to set to said to DataStage to stop the job when DB2 got a FATAL error.

Thank !
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,
if you are calling from command prompt, you can get the return code and can use DsStopJob() to stop the flow.

regard
kumar
Camaj
Premium Member
Premium Member
Posts: 15
Joined: Wed Sep 15, 2004 9:24 am

Post by Camaj »

Thank !

But When I call from command prompt I recieive a code 2, this mean a warning !

How I can know, if my job got this error if the return code is a warning ?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Not understanding you requirment fully :roll: .......

This is again a warning from db2.
if you try to load some duplicate data, the first set of data will be loaded and rest will be rejected.
And it will try to load further with the rest of records.
so instead of rejecting the flow you can try to collect into a reject file.

regards
kumar
Camaj
Premium Member
Premium Member
Posts: 15
Joined: Wed Sep 15, 2004 9:24 am

Post by Camaj »

Yes I understand I can collect error to the reject file but in my stream if this condition will happen, I want to stop the processing with a ABORT.

Thank fro your quick reply !!!
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

l'm also getting this error.

Post by HSBCdev »

I'm also getting this error. What causes this problem? Is it a bug (will it be fixed)? What's the best workaround for it?

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

Post by ray.wurlod »

One workaround would be to post-process the job log. Use DSGetNewestLogID to find the most recent Fatal event; this will return 0 if there is none.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Thanks

Post by HSBCdev »

Thanks - I'll try that
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you're running version 7.5 or later, and if you're controlling the job from a job sequence, then you can include a Terminator activity to issue stop requests to all jobs running under control of that sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

I believe this bug has been fixed in 7.5

Post by HSBCdev »

I can recreate this error in 7.1 but not in 7.5 (i.e. the job correctly aborts when one partition fails because of a deadlock). Is it possible to get it confirmed that this bug has been fixed?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Nothing mention in release notes about these, upto to my knowledge. Best place to get it confiremed, contact your service provider and rasie a case with IBM tech people.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply