Restarting Jobs

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Restarting Jobs

Post by admin »

I would like to know if it is possible to write a universe program to monitor the status of all the jobs and automatically restart them if they have aborted. Or can I do this with current functionality in the Datastage application. It seems that one or two of our jobs will abort once or twice a week due to some type of network problem.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

I will make a wild guess that youre running your batch of jobs via few jobs which exclusively run Job Control. If so, you can inquire with DSGetJobInfo once a job finishes to see what the DSJ.JOBSTATUS is set to. If the job is aborted or stopped, have it reset and rerun the job. But do this only if you are sure of what the error may be!

We have a similar situation that occurs once in a while at 12:30am. Our jobs will abort on an OCI error. Upon resetting and restarting, they run fine. Nobody in the network or DBA area could figure it out. So, to save being woke up every once in a while, we modified our Job Control to check the status of these specific jobs. They will reset and rerun if they abort or stop.

WORD OF CAUTION #1:
Put in a counter so you can control how often you take this approach. If there really is a network problem, reset/rerun for a job a thousand times in a row wont solve anything. We have a counter that gets checked each time we do the automatic reset/restart. If the counter goes above 3, we abort the job stream.

WORD OF CAUTION #2:
We also incorporated a control file (hashed) that we read before doing the reset/restart for a particular job. Why? Well, if you have a job control set to automatically reset/restart, what happens if you really DO want to stop the job? Answer, you cant. The darn thing recovers everytime you click on the Stop button. So, we have a custom file that we can run another job against to set or remove the flag for a particular Job Control jobs auto-restart status. If I want to really stop it, I first run my special job to remove the flag for the job I wish to stop. Then I can issue the stop command and know it wont go any further.

Wow. I rambled a bit. But I hope it gives you an idea of what you can do.

Brad Vincent
Data Warehousing with a "health"-y spin
Compuware
c/o The Detroit Medical Center
(313) 966-2176



> -----Original Message-----
> From: Roosa, Mike [SMTP:Mike.Roosa@getronics.com]
> Sent: Friday, August 10, 2001 2:11 PM
> To: datastage-users@oliver.com
> Subject: Restarting Jobs
>
> I would like to know if it is possible to write a universe program to
> monitor the status of all the jobs and automatically restart them if
> they have aborted. Or can I do this with current functionality in the
> Datastage application. It seems that one or two of our jobs will
> abort once or twice
> a week due to some type of network problem.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

This is easily accomplished with DataStage job control.
Create a job that consists only of a job control routine and, in that routine, perform whatever monitoring task you require.

-----Original Message-----
From: Roosa, Mike [mailto:Mike.Roosa@getronics.com]
Sent: Saturday, 11 August 2001 04:11
To: datastage-users@oliver.com
Subject: Restarting Jobs


I would like to know if it is possible to write a universe program to monitor the status of all the jobs and automatically restart them if they have aborted. Or can I do this with current functionality in the Datastage application. It seems that one or two of our jobs will abort once or twice a week due to some type of network problem.
Locked