How to abort a job when there is fatal error in log?

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
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

How to abort a job when there is fatal error in log?

Post by via »

We are running a job which loads the database.
The job has sequential file--->transformer--->odbc stages.
The job finished successfully with out warnings.When we check the job log, there are fatal errors(deadlock occured).
The job should abort if there are any fatal errors! right?
These error messages are related to database(DB2).
Is there anyway to set our job to abort, when there is any fatal error in the log?

Thanks in advance

Via
Via
-------------------------------------
Learn all the way, as you Grow each Second
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Does this happen for every run? How do you execute the job?
Any special arrangments made for Mssage handler or Check point restratablilty?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Hi Kumar, there are no message handlers defined. Actually there are duplicates in the input file to the database.So, dead lock situation occured, But wondering
whatever is the case, datastage is throwing fatal error and could not abort that job.
Via
-------------------------------------
Learn all the way, as you Grow each Second
savis
Premium Member
Premium Member
Posts: 27
Joined: Tue Apr 15, 2008 11:06 pm

Post by savis »

Hi,

hope this helps...

A terminator stage can be placed in a job sequence to ensure that a job is stopped cleanly if ther are fatal errors.

1) use a job activity stage and select the expression type as failed

2) use a terminator stage and stop all the other subordinate jobs if required..

Thanks,
Savis
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Hi Savis,
What you are saying is correct. But my job is not failing(even though fatal errors)....the status after the job run is finished.So i cant use terminator.
I am running this job individually not through sequence.
Thanks
Via
-------------------------------------
Learn all the way, as you Grow each Second
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When you run a job you can set a maximum number of warnings. The job will abort when this number of warnings is exceeded. A value of 0 means that the job can generate an unlimited number of warnings and still run to completion.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Post by bikan »

May be a afterjob subroutine / routine to search through log file for fatal entries and then stop sequencer based on result.

I am sure there are function like Getloginfo ...etc which will give if log contains fatal msg or not....
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Thanks Ray and bikon.
Ray, there are no warning messages at all in the job log except few fatal error mesasges.
bikon, i am not familiar with routines..may be i should look into them..

Thanks
Via
-------------------------------------
Learn all the way, as you Grow each Second
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

But that is work around to abort the job. But you ll need to check why does it finishes successfully when you get a Fatal Error.
As asked already, do you get this issue everytime you run the job?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply