Hello,
we have a very long chain of sequences and sometimes we need to interrupt this chain. To do this, we set the job status of a job to "not compiled". For the time being, this is done by compiling the job with an error. Is there a way to do this by a routine?
Regards,
Joshi.
Set job status to "not compiled"
Moderators: chulett, rschirm, roy
Hi,
IMHO, your method is crashing the process and thus not a desirable solution.
I prefer using stop from director;
Or putting check-points in your flow that select a value from a control table, If it is set to continue the flow continues, otherwise it logs the event + send notifications and finishes.
in this way when you want to stop the ong flow you simply update the value in the control table and it will stop in an orderly mannor at the first next check point you have.
P.S:
I'm not sure if version 6 has the DSStopJob, if it does you can use it to stop the job.
IHTH,
IMHO, your method is crashing the process and thus not a desirable solution.
I prefer using stop from director;
Or putting check-points in your flow that select a value from a control table, If it is set to continue the flow continues, otherwise it logs the event + send notifications and finishes.
in this way when you want to stop the ong flow you simply update the value in the control table and it will stop in an orderly mannor at the first next check point you have.
P.S:
I'm not sure if version 6 has the DSStopJob, if it does you can use it to stop the job.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Joshi - that's an... interesting... solution. Not something I would have thought of, mostly because our Production jobs are read only and can't be horked with like that.
Suggest you build checkpoints into the process, much like Roy mentions. I've taken more of an approach in the past of assinging a directory as a 'polling' directory and then having a routine that can look in that directory for certain flag files. Find a flag and issue an abort or whatever else seems appropriate at the time. Sprinkle them in the job chain. Then all you need to do is create the appropriate flag file (no records in it, just the file itself) and things will wind down.
Food for thought...
![Wink :wink:](./images/smilies/icon_wink.gif)
Suggest you build checkpoints into the process, much like Roy mentions. I've taken more of an approach in the past of assinging a directory as a 'polling' directory and then having a routine that can look in that directory for certain flag files. Find a flag and issue an abort or whatever else seems appropriate at the time. Sprinkle them in the job chain. Then all you need to do is create the appropriate flag file (no records in it, just the file itself) and things will wind down.
Food for thought...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
DSStopJob was available in version 5
Here are 3 lines of code to do it. There was lots of code in between to make sure the job was running and I attached properly but this should get you close.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
RunHandle = DSAttachJob(JobName, DSJ.ERRNONE)
JStat = DSStopJob(RunHandle)
JStat = DSDetachJob(RunHandle)
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Insert some other Activities to give you the control. Use Routine, Execute Command or Nested Condition Activities - you can effect your control with any of them. For example, an Execute Command activity could test for the existence of a file (you could even use a Wait For File activity here).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.