Hi,
My requirement is if the input parameter value which i give to the job is invalid then I need to abort the job.
Can any body tell me how to abort the job.
I don't want to use Sequencer for this?
Thanks,
Pramod.
Abort a job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What do you mean by "invalid"? A parameter value that is invalid based on data type - for example "FRED" as a date - will not even allow the job to start. Otherwise, use Arnd's offered solution, but limit the link to 1 record because 0 means "unlimited".
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.
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
Aha, thanks Ray - I thought I had edited out the "0" and put in "1" after I posted the message.
As Ray correctly pointed out, the value of "0", which is the default, means unlimited rows and wouldn't have the desired results. I just re-read your post and you mentioned the input parameter, not a data value. In that case, it would be best to catch this in the sequence calling the job and never enter it. If you still need to do this, then use the "Job Control" code to test the value of the parameter and, if it is invalid, issue a direct call to DSLogFatal() so that the job never really gets going.
As Ray correctly pointed out, the value of "0", which is the default, means unlimited rows and wouldn't have the desired results. I just re-read your post and you mentioned the input parameter, not a data value. In that case, it would be best to catch this in the sequence calling the job and never enter it. If you still need to do this, then use the "Job Control" code to test the value of the parameter and, if it is invalid, issue a direct call to DSLogFatal() so that the job never really gets going.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It just occurred to me that, since you apparently don't want to use a job sequence (not a Sequencer - that's something you have IN a job sequence) that you could also effect whatever tests you like in a before-job subroutine. Setting the ErrorCode argument to any non-zero value will cause the job to abort when the subroutine returns.
(I would have thought of this earlier, except that I have a predilection againt having jobs abort under any circumstances.)
(I would have thought of this earlier, except that I have a predilection againt having jobs abort under any circumstances.)
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.
-
- Participant
- Posts: 11
- Joined: Mon Mar 17, 2008 3:14 pm
My input file will have coloumn name system_name.
For example if system_name = "ABC" then i need to continue the job ahead else i need to abort the job.
For my job the system name will be given as input parameter. i.t if paramater value entered as "ABC" tha value should be there in the System_name coloumn.
so thats my requirement.
For example if system_name = "ABC" then i need to continue the job ahead else i need to abort the job.
For my job the system name will be given as input parameter. i.t if paramater value entered as "ABC" tha value should be there in the System_name coloumn.
so thats my requirement.
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia