Hi
I am designing the automation process of my project- In this process there is a Unix daemon process. All the time this Unix process would be running with 10 minute sleep. the process would trigger a shell which runs the datastage job using a dsjob -run.
Here I am implementing File watcher concept- If there is a new file in the SourceFile folder I would trigger a Datastage Job which would load the file to the respective table.
Now my question is I am executing the Unix daemon process from Datastage Job Sequencer as a execute activity. If I need to stop the process is kill -9 is enough or I need to stop the Datastage job.
If I need to stop the datastage job from as shell how to do that?
Thanks for your help
Stop Datastage Job
Moderators: chulett, rschirm, roy
Stop Datastage Job
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
Data Integration Architect
Chicago, IL, USA.
Never ever kill with a -9. This can corrupt repository tables. use kill -15 or just kill. If you have a tightly wound loop then you may not be able to kill it.
I do not see an option to stop a job otherwise. You can do it from a routine. If you knew enough about BASIC then you could create a TCL command to do it.
These 3 API calls are what you need to create a BASIC routine to do it. To create a TCL command then you need to write a real BASIC program and CATALOG it. Do a search. I have talked about this before.
A more graceful way to shut this process down is to have it look for a file like STOPDSJOB. If it sees this file then it ends itself. You already have the logic to look for files. Use it.
I do not see an option to stop a job otherwise. You can do it from a routine. If you knew enough about BASIC then you could create a TCL command to do it.
Code: Select all
RunHandle = DSAttachJob(JobName, DSJ.ERRNONE)
JStat = DSStopJob(RunHandle)
JStat = DSDetachJob(RunHandle)
A more graceful way to shut this process down is to have it look for a file like STOPDSJOB. If it sees this file then it ends itself. You already have the logic to look for files. Use it.
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: