Abort job on reject threshold

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
ashwin2912
Participant
Posts: 57
Joined: Wed Jan 26, 2005 10:22 pm
Location: India

Abort job on reject threshold

Post by ashwin2912 »

I need to abort a job on a reject threshold. The link is from a lookup/filter stage and going to a sequential file. I need to abort the job when the records in this link cross a pre-defined threshold.
This is a parallel job. (Is it advisable to use a BASIC transformer in a parallel job? Esp in such a scenario where no. of recs. in that link will be very small/none.)
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,

Just an idea (i did not try it)
In the transformer properties you can set the
Max log reject messages
and it apears to accept parameters.

Another option is to write a costum stage

Non of them is very elegant but I hope it helps


A
ashwin2912
Participant
Posts: 57
Joined: Wed Jan 26, 2005 10:22 pm
Location: India

Post by ashwin2912 »

Other than using a transformer for counting the records going into reject, I was trying this one:

I took the reject link and put it in a copy stage. One o/p from copy stage going to the Sequential file(reject file) and another one into a wrap stage....(wrap stage calling a UNIX script which will wc-l the reject file and check whether no. of recs is more than threshold...if it is abort job)

The script by itself is fine, but it should get executed for every record coming into the reject link...thats what I think is not happening...
Any suggestions....I have almost given hope on this method :(
legendkiller
Participant
Posts: 60
Joined: Sun Nov 21, 2004 2:24 am

Post by legendkiller »

Hi,

I guess it is very difficult to achive this in parallel job. But as you are saying that number of records are less you can built server job
Post Reply