How to reset sequencer if it gets aborted

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

Moderators: chulett, rschirm, roy

Post Reply
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

How to reset sequencer if it gets aborted

Post by gooogle »

I have a job in a Sequencer that sometimes Aborts .
Now this sequencer does not re-run when it is scheduled from the Director the next time. I have to manually reset & then it runs again.
Is there any way we can Reset the Sequencer if its aborted or Reset evertime before it runs.

Any ideas ...
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: How to reset sequencer if it gets aborted

Post by SURA »

You will have an option called Execution action. Find out what all are the options it has and its use. You will get the solution.

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

Post by ray.wurlod »

The only way to automate this is to run your sequence (and, incidentally, it's not a Sequencer) from another, parent, sequence that does not abort. In the parent sequence, set the run mode to "reset if required, then run".

Actually, that's not the only way, but all the other ways required coding.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

Re: How to reset sequencer if it gets aborted

Post by gooogle »

All the jobs inside that Sequencer have already been set to:
Reset when required then run

Still when the Sequencer gets aborted, it does not run at the next run time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's true... and Ray noted the solution.
-craig

"You can never have too many knives" -- Logan Nine Fingers
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

It was my understanding that by going into the 'Job' tab in the Job Activity stages of a sequence and setting the 'Execution action:' to 'Reset if required, then run' would allow the sequence to be reset.

Now, I'm thinking that the above only resets the specific Job Activity and not the status of the sequence as a whole. Is that correct?

I'm having the same issue and get the following message when a sequence aborts:

"The Job '[job_name]' is not in a runnable state, it may need to be re-compiled. Its current state is 'Aborted'."

From this thread it looks like I need to have my sequence inside another 'shell' sequence and the top layer sequence will have it's Job Activity set to 'Reset if required, then run'. This top layer won't abort when the main one underneath does.

This feels like a workaround. Is there no way to simply have the sequence reset without putting a wrapper around it? Our schedulers will need to call the wrapper sequence and not the actual sequence that does the work. Doable, but not what I had in mind.

Other solutions? Thanks!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

iq_etl wrote:Now, I'm thinking that the above only resets the specific Job Activity and not the status of the sequence as a whole. Is that correct?
Yes.
iq_etl also wrote:Is there no way to simply have the sequence reset without putting a wrapper around it?
No. Something must reset it when appropriate as checkpointed runs complicate the issue. Regardless, you'll need something in place to perform that task when appropriate.

I've always used a 'wrapper script' for that task and that script is what your scheduler should be executing. At a minimum it can validate that the job requested actually exists and is in a runnable state, reseting the job if needed before actually running it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

My experience is different.

Every sequence stage in a job sequence has a triggers tab. I place a "not ok" link to a terminator on every stage from which I want to have a restart checkpoint, with the expression type set to "Failed (Conditional)". Regardless of which stage shows the abort, the checkpoint stays active and if it's a job activity stage the underlying parallel job is automatically reset when the job sequence is rerun. FYI: the continuation trigger link is set to "Otherwise". Your error handling can be more detailed as needed.

A normal sequence Director output will show Info entries for setting the checkpoints and removing them after successful completion. An abort will keep that last checkpoint active. The checkpoint is on the sequence stage, but the "reset if required" attribute is for the object the stage is executing. I believe that understanding that distinction is the important part here.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, I think you're still referring to the tangential conversation about aborted jobs being handled by Job Activity stages inside a Sequence job. The question was for the Sequence itself - if that outer-most Sequence job is aborted it will need to be manually reset before it can be rerun.

Taking checkpointed Sequence jobs out of the equation for a moment, this is true for any job run directly - be it from the command line or the Director client. If it is aborted, it must be Reset before it will run again. When you have jobs run by a Sequence, that becomes the 'wrapper' in question and as noted it can automatically 'reset if needed and run'. No such process exists for the Sequence itself... unless (again as noted) you wrapper that with yet-another-sequence that never aborts and which uses a Job Activity stage to run the actual Sequence job.

I just stated my preference for the 'wrapper' to be a script and for it to handle all of the checking and resetting that may need to be done before a job (of any type) is run.
-craig

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