looping and restartability

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

lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

looping and restartability

Post by lindatgeorge »

Hello,

I have one list loop which calls one sequence. The sequence is called for each of the parameter which is getting passed from the loop. I need to implement the restartability here.ie If the sequence fails while processing the 5th parameter, when restarting the job,it should skip running the sequence for the first 4 parameters and should start from the failed run(which is for 5th parameter).

Please let me know how this can be implemented from loop.

Thanks in advance...

Linda
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

You don't have to do anything special because of loops. Use the same restartability techniques used in standard "straight-through" jobs. It will keep track of the "good" passes through the loop and skip them when restarted.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Andy is correct. This is provable, or you can just trust us.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Post by lindatgeorge »

Thanks a lot to Andy and Ray for the help.... :)
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

That's a very cool feature. I didnt know that.

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

Post by chulett »

I wasn't convinced myself until I watched it do it with mine own eyeballs for the first time many moons ago. 8)
-craig

"You can never have too many knives" -- Logan Nine Fingers
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Re: looping and restartability

Post by lindatgeorge »

Hello everyone,

I tried running a sequence inside one list loop with 3 parameters. Also restartability was implemented in the sequence level by adding checkpoint. The job ran and completed for the first 2 parameters and failed for the third one. When it was restarted, datastage gave a warning message that, the parameters are not the same as that of checkpointed, and continued executing the sequence for the first 2 parameters (which were completed successfully in the previous run) again. May I know how to correct this?

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

Post by chulett »

Restart it with the same parameters you used for the failed run and then let us know what happens. And have you checked any of the "Do not checkpoint" options in your stages?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, perhaps it's unclear which job is giving you the warning message re: the parameters. I was assuming the outer loop Sequence job but you are talking about the inner Sequence job it seems.

Question: when the inner Sequence job aborted did the outer Sequence job abort as well? It must and both need checkpoints and to show "Aborted/Restartable" as their status for this to work. Which means you'll need to abort the outer (say, with a Terminator stage) when you detect a failure in the inner.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Post by lindatgeorge »

I am using the datastage 8.1 version.

The outer sequence will fail, when the inner sequence fails. The inner sequence has a job and a routine.So the inner sequence and the outer sequences are on "aborted/restartable" state after the job run, and checkpoints are enabled for both. But still ,on restarting it runs from the beginning (ie, from the first parameter).
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

How are you passing the parameters (assuming the warning is in inner sequence only).
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Post by lindatgeorge »

I am passing the parameters comma seperated from the start loop, like p1,p2,p3

Also the inner sequence execution action is "Reset if required,then rerun"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Odd. As noted, I know this works just fine in the 7.5.x world, perhaps something is not quite right in the version you have. I would suggest contacting your official support provider and seeing if this is a known issue with perhaps a patch available for it. :?

In the meantime, can you list the stages used in your outer Sequence job?
-craig

"You can never have too many knives" -- Logan Nine Fingers
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Post by lindatgeorge »

My outer sequence has start loop, inner sequence and End loop. The inner sequence contains one job activity (which extracts data from one oracle table and writes into a sequential file) and one routine (which runs job by accepting parameters)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How are you controlling your loop? Does it run for a fixed number of times? Perhaps that has something to do with this as I've always used a UserVariables stage to feed a dynamic 'list of things' to the stage. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply