DOS command to abort a job
Moderators: chulett, rschirm, roy
DOS command to abort a job
Hi,
If the storedprocedure extracting data from the source tables returns no record, then I need to abort the job.
I guess it can be done in the after job routine by calling some batch file.If so,can anyone let me know the DOS command through which i can abort the job.
Thx,
Rajee
If the storedprocedure extracting data from the source tables returns no record, then I need to abort the job.
I guess it can be done in the after job routine by calling some batch file.If so,can anyone let me know the DOS command through which i can abort the job.
Thx,
Rajee
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Setting the second argument (ErrorCode) of an after-job routine will abort the job. If you are using ExecSH or ExecDOS it should be sufficient to execute a command that will fail, for example mr mxyzpltk
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.
ray.wurlod wrote:Setting the second argument (ErrorCode) of an after-job routine will abort the job. If you are using ExecSH or ExecDOS it should be sufficient to execute a command that will fail, for example mr ...
Ray I am not able to have a complete view of your reply,hence still no clue about implementing the above functionality.......
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Premium membership is inexpensive, at less than 30c (Rs12) per day. if you had premium membership you would be able to read my entire reply, and get other benefits as well.
All revenue from premium membership is devoted to defraying hosting and bandwidth costs incurred by DSXchange. So, by taking premium membership, you additionally benefit by ensuring that DSXchange will be there to answer your questions in future.
All revenue from premium membership is devoted to defraying hosting and bandwidth costs incurred by DSXchange. So, by taking premium membership, you additionally benefit by ensuring that DSXchange will be there to answer your questions in future.
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.
Rajee wrote:ray.wurlod wrote:Setting the second argument (ErrorCode) of an after-job routine will abort the job. If you are using ExecSH or ExecDOS it should be sufficient to execute a command that will fail, for example mr ...
Ray I am not able to have a complete view of your reply,hence still no clue about implementing the above functionality.......
Ray,I cannot use any after-job routine to abort the job as I am using ExecDOS in the after-job subroutine to call a batch file.Also,i need to check for if a particular file is empty and only then abort the job.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Of course you can. You can execute a pipeline through ExecDOS (for example command1 ; command2) or you can create your own after-job subroutine that invokes the batch file and tests for the empty file.
I still prefer never to abort jobs.
I still prefer never to abort jobs.
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.
ray.wurlod wrote:Of course you can. You can execute a pipeline through ExecDOS (for example command1 ; command2) or you can create your own after-job subroutine that invokes the batch file and tests for ...
Ray,as Iam not able to view your response fully I am not able to understand your logic/solution fully and implement it.If getting the premium membership is the ony way to view your response fully then I am unfortunate as of now.
Rajee - the important part of Ray's post is visible to you.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
ArndW,as per Rays logic,ArndW wrote:Rajee - the important part of Ray's post is visible to you. ...
1.I need to invoke the batch file through the after-job subroutine and check for the file with 0 byte and abort the job.
My queries with respect to Ray's response are,
1.How to invoke a batch file through after-job subroutine?
2.How to pass the batch file parameters if I invoke the batch file through after-job subroutine?
3.I know only a DOS command to check for the existance of 0 byte file,in such case can i call the Datastage subroutine through the DOS command that i use to check for the 0 byte file in the batch file to abort the job.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: