Page 1 of 1

Suspend Datastage Jobs

Posted: Tue Jan 25, 2011 6:17 pm
by 47shailesh
Hi,

I have a shell script which executes and drop indexes, delete data from few tables and create indexes.
I would like to suspend all datastage jobs which use these table from the script itself, such that no one can execute the jobs untill the script finishes.

#Is it possible to set status of a job to running before my script start and once it finishes reset the status to RunOk.

-
Thanks & Regards
Shailesh

Posted: Tue Jan 25, 2011 6:33 pm
by ray.wurlod
There is no mechanism for suspending, or "pausing", an already-running DataStage job.

You could, if you can make a good case, submit that as an enhancement request.

Posted: Wed Jan 26, 2011 1:16 am
by 47shailesh
ok,

is it possible to suspend/hold a job from starting which is not running. if it is possible, I would like to avoid the job from starting until my script finishes.


-
Thanks & Regards
Shailesh

Posted: Wed Jan 26, 2011 1:25 am
by Sreenivasulu
1.Write to a 'flag file' with the status 0 (finished),1(not finished) after the 'index related work'
2.A job which polls the file using the waitforactivity stage
3.Use the job created in step2 before any datastage jobs which uses the table

Regards
Sreeni

Posted: Wed Jan 26, 2011 6:55 am
by chulett
In other words, you'll need to build your own 'job control' to be able to do anything like this, be it a simple 'pre' check in a Sequence as noted above or as complicated as you'd like.

Posted: Wed Jan 26, 2011 12:12 pm
by 47shailesh
Thanks Shreeni for the tip.
But I would like to do that from the shell script rather than going the datastage way.

#Is it possible to set the status of job from RunOk to Running and later reset the status again to RunOk again.

#Or is it possible to disable the jobhandler for few jobs, such that no one can attach the job



-
Thanks & Regards
Shailesh

Posted: Wed Jan 26, 2011 3:27 pm
by ray.wurlod
47shailesh wrote:#Is it possible to set the status of job from RunOk to Running and later reset the status again to RunOk again.
Not legally.
47shailesh wrote:#Or is it possible to disable the jobhandler for few jobs, such that no one can attach the job
Only by stopping the engine.