aborting job

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
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

aborting job

Post by samba »

Hi,
I have a source ( sequential file) for which few mandatory checks are being performed. and i also have a error link to capture these in an error file. my requirement says that if the error file records exceeds 10% of the source records the job needs to be aborted.
Can anyone help me to get this done.
Thanks in advance,
Samba
samba
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Your problem is that you can't know in advance how many represents 10% unless you know how many are in the file to begin with. You could pre-process the row to get this count.

Direct the Reject output link from the Sequential File stage through a Transformer stage which tests whether this threshold has been exceeded and, if so, call a routine that aborts the job.

To my way of thinking, any requirement to abort a job should be challenged. You can process all the data, then check the row counts, then take any remedial/notification action required. It's a more streamlined approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

Post by samba »

Datastage jobs will run daily on incremental basis
how many records will come daily in source file we dont know.

if error records exceeds 10% we have to abort particular job

Thanks in Advance
samba
samba
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Who says you have to abort the job? Make them justify such an ill-advised decision! Robust ETL requires that you maintain control at all times.
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