Unix Script for restartability

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

Moderators: chulett, rschirm, roy

pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Unix Script for restartability

Post by pandeesh »

Hi,

I have a sequence which has 5 job activity stages.
I need to run the sequence using unix script.
I am not using checkpoints in sequence.
i want to handle the restartability in unix scripts.

Any suggestions welcome.

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

Post by ray.wurlod »

Use the dsjob command. Restartability will take care of itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Thanks Ray!!

Do you mean using DSJOB without the -mode RESET switch?

Thanks
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No. Since you've said there are no checkpoints involved, you will need to RESET the job if it aborted on the previous run.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Yes. I agree that the job needs to be reset before the run.
But the script is going to trigger the main sequence.
so, i believe there is no need of resetting the sequence.
if we reset the job sequence, it will start the first job in stead of the aborted job.
Please correct me ,if i am wrong.
Thanks
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you're not using checkpoints then the job (sequence) status will never be "restartable". Therefore if it aborts, it will need to be reset. But a top-level sequence should be written so that it never aborts.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Unix Script for restartability

Post by chulett »

pandeesh wrote:I am not using checkpoints in sequence.
What happened to this part? (emphasis mine)
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Ok fine.Due to lack of checkpoints,the sequence needs to be reset.
But how DSJOB will track the aborted job in the sequence and start running from there?
If the sequence is reset, then it will start a fresh run.

But i want to start from where it aborts in the last run.
At the same time, there should not be any checkpoints in sequence.

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

Post by ray.wurlod »

It won't. You need checkpoints for that.

Or you can create the same logic in your sequence. Before every activity check whether (a) the sequence failed to finish successfully and (b) whether that activity finished successfully and, based on those results, make the decision whether to invoke the activity.

Why bother? Enable checkpoints.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

pandeesh wrote:i want to start from where it aborts in the last run.
At the same time, there should not be any checkpoints in sequence.
Those are mutually exclusive requirements, unless for some reason you want to play the "roll your own" game. As noted, why bother? Enable checkpoints.

Be curious to hear your counter-point, why the "should not be any" requirement is on the table.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

chulett wrote:Be curious to hear your counter-point, why the "should not be any" requirement is on the table.
Craig,
The above is not clear.
Can you please explain?

Thanks
pandeeswaran
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

I thought it was pretty clear. You have stated:
But i want to start from where it aborts in the last run.
At the same time, there should not be any checkpoints in sequence.
Why can't checkpoints be used?
- james wiles


All generalizations are false, including this one - Mark Twain.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

The simplest way is adding checkpoints in sequence and using sahib without -mode reset switch .
But I am curious ,whether we can implement the restart ability in unix script without using checkpoints.
But it's pretty clear that implementing a generic script is complex.
But if we know the number and types of stages in sequence ,
Then we can implement job sequence specific script in our own way.
I will try Jon sequence specific script and let you know.
Thanks
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

pandeesh wrote:But if we know the number and types of stages in sequence ,
Then we can implement job sequence specific script in our own way.
The above is not clear.
Can you please explain?

OK, a little good natured tease but honestly - I have no idea what a "job sequence specific script" could possibly be. How do you imagine you can change where a sequence job without checkpoints restarts from outside of it using a shell script? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

I got your point Craig.
What i meant was creating a shell script as an alternative to sequence,
Actually the script is not going to trigger the sequence but the individual jobs which called in the sequence,
In this case there's no need of job sequence.
Whatever we are going to implement in sequence, we will do that in script level .
I will try this script.

Thanks
Last edited by pandeesh on Thu Nov 03, 2011 11:20 pm, edited 1 time in total.
pandeeswaran
Post Reply