Stop a 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
ashik_punar
Premium Member
Premium Member
Posts: 71
Joined: Mon Nov 13, 2006 12:40 am

Stop a Sequencer

Post by ashik_punar »

Hi Everyone,

I am designing a Sequencer in which my requirement is like this that i will be checking for a particular file using a shell script. If the file is present then i will run a set of jobs but if that is not present then i have to stop the sequencer there itself. Currently i am doing the same with the help of Terminator Activity. But the problem is that if i use this activity then the sequencer is getting aborted and i need to compile it again in order to run it. I tried to write a routine also so that i can use the DSStopJob function. But when i am trying to do the same i am getting a message like the array DSStopJob never dimensioned.
Can anyone please guide which is the best way to achieve the required functionality.

Thanks in Advance,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You don't need to use a terminator activity, just put one single conditional output on your execute command stage that calls the shell script.
I hope you know that there is a stage, called Wait_For_File, which does exactly this and is builtin to DataStage and is much easier to use than calling external programs.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Instead of terminator activity, you can use exec command activity to call the "dsjob -stop PROJECT JOB" command

You can also refer
this post

You should create a wrapper sequencer that does "ResetIf required Then run" on the sequencer you are trying to run. A stopped or aborted job sequencer has to be reset in order to run it again from start,or else it will run from where it was stopped(assuming you have checkpoints enabled).But its not recommended to compile everytime
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, you don't need to stop the Sequence when the file is not found, simply do not execute any of the downstream processes. And all that takes is the correct conditional trigger.
-craig

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