Page 1 of 2

looping and restartability

Posted: Thu Jul 23, 2009 7:56 am
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

Posted: Thu Jul 23, 2009 8:59 am
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.

Posted: Thu Jul 23, 2009 5:08 pm
by ray.wurlod
Andy is correct. This is provable, or you can just trust us.

Posted: Thu Jul 23, 2009 9:37 pm
by lindatgeorge
Thanks a lot to Andy and Ray for the help.... :)

Posted: Fri Jul 24, 2009 1:28 am
by Sreenivasulu
That's a very cool feature. I didnt know that.

Regards
Sreeni

Posted: Fri Jul 24, 2009 5:41 am
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)

Re: looping and restartability

Posted: Sun Jul 26, 2009 9:47 pm
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

Posted: Sun Jul 26, 2009 10:35 pm
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?

Posted: Sun Jul 26, 2009 11:03 pm
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.

Posted: Mon Jul 27, 2009 4:12 am
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).

Posted: Mon Jul 27, 2009 4:18 am
by priyadarshikunal
How are you passing the parameters (assuming the warning is in inner sequence only).

Posted: Mon Jul 27, 2009 4:25 am
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"

Posted: Mon Jul 27, 2009 6:40 am
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?

Posted: Mon Jul 27, 2009 6:59 am
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)

Posted: Mon Jul 27, 2009 7:10 am
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. :?