How to abort job based on constraint
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create another output link from the Transformer. Its constraint is the logical inverse of the constraint you have been using. On this link set Abort After Rows to 1. The link can connect to a Copy stage with no output. This will consume the row if it gets that far.
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: 222
- Joined: Tue Aug 30, 2005 2:07 am
- Location: pune
- Contact:
Hi Ray,ray.wurlod wrote:Create another output link from the Transformer. Its constraint is the logical inverse of the constraint you have been using. On this link set Abort After Rows to 1. The link can connect to a Copy ...
Its a good idea to capture the rows to another link and abort the job.
Here my doubt is if it has only one row, what will be the position, is it aborts the job ?
I have one more requirement like abort the job based on constrtaint and set a customised fatal error in the log (like job aborted because of a not equal to b ), in this scenarios what will we have to do ? is there any built in function to do this ? or we have to use any logice for that ?
Thanks.
NageshSunkoji
If you know anything SHARE it.............
If you Don't know anything LEARN it...............
If you know anything SHARE it.............
If you Don't know anything LEARN it...............
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try it and see.
(One row does abort the job. But don't take my word for it - a test job would take less than two minutes to create.)
Your additional requirement is not part of the original question, but could easily by solved by creating a column derivation or even constraint expression on the second output link that included a call to DSLogFatal().
As you may have read elsewhere, I do not believe in jobs aborting under any circumstances. Then, when they do, it has to be an environmental factor, such as database not available. Even then, you can test for that with an innocuous job before starting the real work.
(One row does abort the job. But don't take my word for it - a test job would take less than two minutes to create.)
Your additional requirement is not part of the original question, but could easily by solved by creating a column derivation or even constraint expression on the second output link that included a call to DSLogFatal().
As you may have read elsewhere, I do not believe in jobs aborting under any circumstances. Then, when they do, it has to be an environmental factor, such as database not available. Even then, you can test for that with an innocuous job before starting the real work.
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: 36
- Joined: Wed Feb 16, 2005 5:20 pm
- Location: IL
-
- Participant
- Posts: 222
- Joined: Tue Aug 30, 2005 2:07 am
- Location: pune
- Contact:
-
- Participant
- Posts: 36
- Joined: Wed Feb 16, 2005 5:20 pm
- Location: IL