Hi
In my Px job, after some condition in transformer is evaluated false, I want that DataStage job to abort. It should not execute further stages. Can someone suggest me what is the way out of this?
Thanks in advance.
Conditional job abort
Moderators: chulett, rschirm, roy
Conditional job abort
Thanks with regards,
videsh.
videsh.
Re: Conditional job abort
Break your job into two jobs. First job sets the job status conditionally and according to the condition the second job is triggered. If you don't want to break up your job, you will have to use a basic transformer stage and call a basic routine which will abort the job.videsh77 wrote:Hi
In my Px job, after some condition in transformer is evaluated false, I want that DataStage job to abort. It should not execute further stages. Can someone suggest me what is the way out of this?
Thanks in advance.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
You can force a job to abort in a transformer by setting the 'Abort After Rows' field for a link on the constraints page. In your case add a link if you don't already have one with a constraint that is the condition you want to catch.
I don't think it is very good practice to force a job to abort and I have seen cases where this functionality does not abort the job because the signal is not detected before the job finishes. Can you achieve the desired outcome by checking the status of the job after it finsihes and counting the number of rows going down particular links?
I don't think it is very good practice to force a job to abort and I have seen cases where this functionality does not abort the job because the signal is not detected before the job finishes. Can you achieve the desired outcome by checking the status of the job after it finsihes and counting the number of rows going down particular links?
-
- Participant
- Posts: 222
- Joined: Tue Aug 30, 2005 2:07 am
- Location: pune
- Contact:
We Can achieve your requirement by writing the Basic Routine and call that in After Subroutine box.
First thing is make the constraint as per your requirement in a new link called dummy link ( Condition is data='False') in that link just create a column called Dummy and direct to Copy stage and leave as it is. If your constrained satisfied with your input data then rows will go to the dummy link.
In the Basic routine use DSGetLinkInfo to get row count and write conditon that if that particular link have the rows more than 0 then abort the job and u can create Abort message also in your job by using DSLogFatal.
Hope it will be helpful......
First thing is make the constraint as per your requirement in a new link called dummy link ( Condition is data='False') in that link just create a column called Dummy and direct to Copy stage and leave as it is. If your constrained satisfied with your input data then rows will go to the dummy link.
In the Basic routine use DSGetLinkInfo to get row count and write conditon that if that particular link have the rows more than 0 then abort the job and u can create Abort message also in your job by using DSLogFatal.
Hope it will be helpful......
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...............