How to Restart Datastage sequence when a job aborts?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

How to Restart Datastage sequence when a job aborts?

Post by dxk9 »

Hi,
I want to know how a sequence can be restarted if a job in the sequence aborts. And if the restart is done, what is the process/sequence in which datastage does it?

I searched the forum regarding this, but not sure about the procedure to do it. Can anyone let me know the way to do it without using UNIX scripts.

Regards,
Divya
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

If you want to do it at datastage level go to director and run it by giving the appropriate parameters it would run as it normally runs only thing would be it will skip the checkpointed onces which ran sucessfully on the prior run.
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

I want to restart it automatically.

Till date, if the sequence aborts cause of a job abort, then I generally reset the job and the restart the sequence manually.

So just wanted to know how to automate it.

Regards,
Divya
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Use loop stage and check for status ='2' (abort) . This will re-run the job automatically.

I think this will re-run the job but it will fail again since a job would have aborted due to some 'issue' requiring some 'fix'

Regards
Sreeni
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

I want to re-start the sequence from the point it stopped. Which means :
a. The job which aborted should be reset.
b. The sequence should be restarted.

Guess you got confused between restart and reset.

Regards,
Divya
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

from sequence set in job properties "Reset if required then run". It will reset the job automatically. Rest it to loop whenever the job aborts.

BTW, for aborted jobs code is 3 not 2.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

dxk9 wrote:I want to restart it automatically.
No such thing. You could code something but there's no automagical option for this. The aborted child job can be easily reset as noted and you can build a loop of some kind for the sequence itself but how will the actual problem fix itself? Sounds to me like all you're going to get is a constant crash-restart-crash-restart endless loop. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I wouldn't write off the retry on abort - sometimes a job aborts and then works the next time due to resource conflicts. Sequence jobs have some restart from checkpoint capabilities built in if you enable it in the sequence job properties so if a job called from that sequence aborts the sequence will stop. If you run that sequence again it will start from the job that failed and skip the jobs that worked. If you set you job activity stages to reset and run instead of just run it should reset and run aborted jobs okay.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

vmcburney wrote:If you set you job activity stages to reset and run instead of just run it should reset and run aborted jobs okay.
Mmmmaybe. Really depends on why it aborted.

I wasn't suggesting this be written off, just written intelligently. Have some kind of an out, a reasonableness test for 'stuckage' rather than simply spinning in an endless Big Bang. That way leads to increasing entropy, black holes and perhaps even the heat death of the universe. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

Yes. The aborts in jobs are mostly cause of the resources, so it runs fine the next time.

So I want to know the entire procedure (step-by-step) to
a. Reset the job which gets aborted.
b. Restart the sequence which got aborted cause of the job abort.
I want the above two things to be done automatically without manual intervention.

Your detailed explaination are highly appreciated.

Thanks in advance.

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

Post by ray.wurlod »

(1) Automatic reset of job is achieved by setting its run mode in the job activity to "reset if required, then run".

(2) Automatic reset of job sequence can only be achieved by running that sequence from a parent sequence, which never aborts.

Note, however, that it is not necessary to reset a Restartable sequence, provided that it is configured not to abort if one of its activities fails.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

Ray,
I am not able to view your entire reply cause I am not a premium member :(

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

Post by ray.wurlod »

That, at least, is easily remedied. :wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Post by dxk9 »

how can I view your reply without becoming a member :(
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can't.

Premium memberships are one of the ways in which the hosting and bandwidth costs of DSXchange are defrayed. By taking premium membership you not only benefit in a number of ways, but can also rejoice in the knowledge that you're helping to keep DSXchange alive. It's not expensive, at less than 30c (Rs 12) per day.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply