How to abort job with the condition in the Transformer

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
karthikdsexchange
Participant
Posts: 15
Joined: Thu Aug 07, 2008 2:56 am

How to abort job with the condition in the Transformer

Post by karthikdsexchange »

"How to abort DS job when the condition in Transformer stage is not met".

When I execute the job I want to pass in a number parameter ie. 100 and then to check if that number matches with the input file count in the job. If it does, I want the job to continue otherwise to abort?
Karthik
Make It Work Make It Right Make It Fast
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

Can you perform the check in a sequence before you start the job?

Or you could perform the row count and pass the row count value to a lookup which is feeding the parameter value and set the lookup to 'Fail' if the lookup value is not found.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't do it in the Transformer stage. Do it in a before-job subroutine (after all you only need to check once). Set ErrorCode to a non-zero value to abort the job. Or handle it in a sequence before even running the job, as suggested.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply