Hi,
Does anyone know how to detect if a sequence has been restarted?
I would like to redirect the processing in such an event.
Many thanks,
Bob.
Detect restart
Moderators: chulett, rschirm, roy
Detect restart
Bob Oxtoby
I for one would like a little more detail before diving into this. Can you clarify what you mean by "restarted"? I'm guessing you mean one with checkpointing that has aborted and then is restarted from the point of failure but would like that confirmed.
I'd also be curious what "redirect the processing" would mean, something you have no control over if you are using checkpoints.
I'd also be curious what "redirect the processing" would mean, something you have no control over if you are using checkpoints.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, you can detect whether a given run of a checkpointed sequence is happening after a restart. There are 2 DS routines which can be called to set and retrieve checkpoint information, I've used them in the past; unfortunately I'm now away from a DS installation where I can check what they are called. If you create a small sequence with just one stage and make it restartable and look at the generated source code (in the Designer job control) you can easily find the call that checks for existence of a checkpoint and build that into your sequence manually.
Hi,
Thanks for the suggestion of looking in the Sequence code in the job header. I found the routine "DSCheckPointExists" and created the routine below.
However, the routine when called from the sequence always returns "START" whether running from normal or restart. As far as I can tell the function is always returning zero.
Can you see what I am doing wrong?
Many thanks,
Bob.
Thanks for the suggestion of looking in the Sequence code in the job header. I found the routine "DSCheckPointExists" and created the routine below.
However, the routine when called from the sequence always returns "START" whether running from normal or restart. As far as I can tell the function is always returning zero.
Can you see what I am doing wrong?
Code: Select all
$include DSINCLUDE DSJ_XFUNCS.H
If DSCheckPointExists(DSJ.ME, cp$dtm) Then
Ans = "RESTART"
End
Else
Ans = "START"
End
Bob.
Bob Oxtoby