Reset the sequencer

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Reset the sequencer

Post by shrey3a »

Hi,

We have sequencer job which is not in restartable mode i.e. if it fails the entire process has to start from begining we do not want it to start from where it fails.

Can we reset the sequencer job from unix script we have all server jobs
in sequencer been set to reset if required and run.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Dont make it restartable. And yes, reset it and then run. It will run from the begining.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

DSguru2B wrote:Dont make it restartable. And yes, reset it and then run. It will run from the begining.
I think this can not be acheieved if the sequencer fails and its not in restartable mode how the unix script will run it i.e. the sequencer will be aborted state and hence can not be run.

We need to reset the sequencer if it aborts and then we have oprtion reset if required and run for all the server jobs called in job activity stages.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

...by reseting it from unix command

Code: Select all

 dsjob -run -mode RESET <<PROJNAME>> <<SEQName>>
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

DSguru2B wrote:...by reseting it from unix command

Code: Select all

 dsjob -run -mode RESET <<PROJNAME>> <<SEQName>>
thanks...this will reset the sequencer everytime it runs....seems we need to check the return code for abort or failure and then reset if it has aborted .......just wndering what is the return code for job abort...i.e. my unix skills are too weak .......or you have a piece of code which satisfy the above.

Thanks for all help.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Return code for an aborted job is 3. While running the job, stick in -jobstatus so that the return code of the command will be infact the job status which can be read by $?

Also, search the forum, you will find a variety of shell scripts that does this for you.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

[quote="DSguru2B"]Return code for an aborted job is 3. While running the job, stick in -jobstatus so that the return code of the command will be infact the job status which can be read by [b]$?[/b]

Also, search the forum, you will find a variety of shell scripts that does this for you.[/quote]

Thanks :-)
Post Reply