Page 1 of 1

abort job based on condition

Posted: Wed Sep 09, 2009 9:30 am
by dodda
Hello

I have a requirement where i need to abort the job based on some source column value.

I am reading a sequential File and There is a lookup involved in between. Based on the Source value which iam reading from the sequentila file i am doing the lookup to get the REJCOUNT value from the Lookup Fileset.
My requirement is If the REJCOUNT Column value is more than 1 then i need to abort the job. Please help me

Posted: Wed Sep 09, 2009 9:50 am
by DSguru2B
Redirect the row to a seperate link based on your conditions and use out of box functionality "Abort after n rows". Specify a value of 1 there.

Posted: Wed Sep 09, 2009 9:51 am
by ds_teg
To conditionally abort the job use transformer stage

Posted: Wed Sep 09, 2009 9:54 am
by dodda
Hi
Thanks for your response . Here i will be getting only 1 row. In that Row the column REJCOUNT value might be 0 or more than 0. I want to abort only if REJCOUNT value is greater than 0.

Thanks

Posted: Wed Sep 09, 2009 10:04 am
by ArndW
As DSGuru2B has recommended, put in a transform stage and put a constraint "In.REJCOUNT <> 0" going out and place a limit of 1 row on that link, that will trigger the job to abort.

Posted: Wed Sep 09, 2009 11:37 am
by dodda
Hi

i tried with same what you have mentioned. The job Still Fails even if the REJCOUNT is equal to 0. am i missing some thing

Posted: Wed Sep 09, 2009 12:03 pm
by ArndW
Do you have a link marked as "Reject" in the transform stage?