abort job based on condition

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

abort job based on condition

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ds_teg
Premium Member
Premium Member
Posts: 51
Joined: Tue Aug 11, 2009 6:53 am
Location: Chicago

Post by ds_teg »

To conditionally abort the job use transformer stage
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you have a link marked as "Reject" in the transform stage?
Post Reply