Page 1 of 1

DS sequence checkpoints.

Posted: Mon Jul 23, 2007 3:23 pm
by leomauer
I would like know where the sequence checkpoints stored during the execution. And can I change their values from outside of the sequence.
The requirement is to be able to skip the job if needed.
Of course it can be coded into routine or job control that runs the job. But I realized that the checkpoints do the same and I just need to change their value to get the same effect.
Thanks.

Posted: Mon Jul 23, 2007 4:41 pm
by jguerrero
leomauer,

You need to mark "Add checkpoint so sequ...." in the job properties of the sequence, but the most important thing is that only works if you have terminator stages that makes de entire sequence fail when a job fail.

regards,

Posted: Mon Jul 23, 2007 6:26 pm
by chulett
Can you describe under what circumstances you would envision a job needing to be skipped? If it's not something checkpoints can achieve, it may just mean that you need to build a conditional branch into your job stream...

Posted: Tue Jul 24, 2007 6:21 am
by leomauer
chulett wrote:Can you describe under what circumstances you would envision a job needing to be skipped? If it's not something checkpoints can achieve, it may just mean that you need to build a conditional branch into your job stream...
Craig.
It is not that I am not able to code it in Sequence (using Nested condition or some other trick) or create a wrapper that will have all the functionality of Job Activity + skips and some more.
The requirement was to be able to skip any single job in any sequence. In our environment the sequential execution of jobs often dictated by the luck of computing power, not the real dependency. So sometimes to rerun the sequence, we do not need to run it entirely, we may need to skip some jobs in it.
I realized that if I can access checkpoint place from outside the sequence, then I can make it think that this job was completed in the current run and can be skipped. The mechanism would be very similar to what I would code in a wrapper.

Posted: Tue Jul 24, 2007 6:29 am
by chulett
So, your requirement is to be able to skip *any* single job in a Sequence job? Or 'some jobs in it'? Regardless, interesting requirement.

If your Sequence has Checkpoints enabled, then it does seem like you could do something outside the job itself to 'reset' or manipulate the checkpoints to make it work as you envision. About all I could suggest is you take a simple example Sequence job and examine the generated code on the Job Control tab. Everything it does is there. I would think you'd be able to mimic whatever goes on for checkpoint completion, but never having tried couldn't say for certain.

Good luck, it's generated code so not known for its readability. :wink:

Posted: Tue Jul 24, 2007 2:01 pm
by ray.wurlod
There's no point telling you where the checkpoints themselves are stored. Manipulate them with the functions you see in the job control code generated by compiling the job sequence.

I disagree with Craig, I find it quite readable.

Posted: Tue Jul 24, 2007 4:01 pm
by chulett
I didn't say it wasn't readable, I just said it wasn't known for its readability. I don't have an issue with it either. However, for someone not quite as... intimate, shall we say, with code of that nature as you are it can be quite intimidating at first blush. :P

Posted: Tue Jul 24, 2007 9:23 pm
by leomauer
ray.wurlod wrote:There's no point telling you where the checkpoints themselves are stored. Manipulate them with the functions you see in the job control code generated by compiling the job sequence.

I disagree with Craig, I find it quite readable.
I realized that the checkpoints are controlled by the group of DS functions DSCheckPoint.......().
The first parameter of this function is the job handle. Within the sequence it is DSJ.ME. But I still do not know if those checkpoints are stored anywhere where I can set them up when sequence not running (aborted or haven't even started yet). Can I access those particular storages from outside the sequence?
So far it seems to me that those checkpoints exist only during the sequence run including aborts/restarts.
That why I need to know where they are stored, to make sure that I am really affecting the values, and not just running blind, relying on the fact that if I invoke the function, it should work.
Also I was not able to find the descriptions of those functions anywhere in my documentation.