DataStagers,
Does anyone know how to stop a multiple instance job? This code does not work:
JobName = 'QaJobHistMI.Mi1'
RunHandle = DSAttachJob(JobName, DSJ.ERRNONE)
JStat = DSGetJobInfo(RunHandle, DSJ.JOBSTATUS)
if JStat = 0 then
JobStatus = 'Running'
JStat = DSStopJob(RunHandle)
end
JStat = DSDetachJob(RunHandle)
Has anyone been able to stop a multiple instance job in a program? I know the Director can do it. Does the dsjob command work?
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
Stopping a multiple instance job
Moderators: chulett, rschirm, roy
When you say it doesn't work, do you mean the job doesn't stop? What kind of job are you testing? If it's a BATCH job not using DS API's chances are it won't stop. There are commands that do not honor a stop, such as SLEEP, EXECUTE, etc.
If your job is a Server job it should work as you've coded it. Unless of course, it's stuck waiting on database activity such as a select or a commit.
Kenneth Bland
If your job is a Server job it should work as you've coded it. Unless of course, it's stuck waiting on database activity such as a select or a commit.
Kenneth Bland
Kenneth
I use this code to stop all my jobs. It works fine with all the jobs tested except a multiple instance server job. The Director can stop the same job. I am not sure what the problem is. That is just the important parts of the code and not all of the BASIC program.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
I use this code to stop all my jobs. It works fine with all the jobs tested except a multiple instance server job. The Director can stop the same job. I am not sure what the problem is. That is just the important parts of the code and not all of the BASIC program.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
Hi Kim,
I had a similar problem in DS version 5.2. Trying to stop an invocation of a job, say 'job1.inv1', I got an error message saying that job 'job1' wasn't running or paused, DSStopJob tried to stop the job without invocation. Ascential delivered a patch file which solved the problem.
Kind Regards
Stephan
I had a similar problem in DS version 5.2. Trying to stop an invocation of a job, say 'job1.inv1', I got an error message saying that job 'job1' wasn't running or paused, DSStopJob tried to stop the job without invocation. Ascential delivered a patch file which solved the problem.
Kind Regards
Stephan
Stephan
That is not encouraging but thanks.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
That is not encouraging but thanks.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
Stephan
dsjob -stop KimStage QaJobHistMI.Mi1
does not work either. nor:
dsjob -stop KimStage QaJobHistMI
DataStage sux.
Not really.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
dsjob -stop KimStage QaJobHistMI.Mi1
does not work either. nor:
dsjob -stop KimStage QaJobHistMI
DataStage sux.
Not really.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
Kim
yes, I also experienced problems with the dsjob command regarding the invocations. dsjob wasn't able to return the correct list of the invocations of a job, usually you get only the job itself. Specifying an invocation as an argument to dsjob, the list will only contain that one invocation.
Kind Regards
Stephan
yes, I also experienced problems with the dsjob command regarding the invocations. dsjob wasn't able to return the correct list of the invocations of a job, usually you get only the job itself. Specifying an invocation as an argument to dsjob, the list will only contain that one invocation.
Kind Regards
Stephan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ray
This code stops all jobs but multiple instances. The bug is not in my code.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
This code stops all jobs but multiple instances. The bug is not in my code.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com