abort job and capture rejcts

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 and capture rejcts

Post by dodda »

Hello

I have a scenario where i have to abort the job if i see any rejects out of oracle stage.I am doing only inserts in the oracle stage. So i have changed the property in the oracle stage to ouput reject rows=true. But the requirement is i need to capture the first rejected record from the oracle stage in a file so that i can send email to the support team and then i have to abort the job.
my job design is as below


seqfile----trf----oracle------trf---seqfile

i used abort after 1 row property in the transformer coming out of orcle. the job is getting aborted but when i see the rejected File it is empty. Is there a way that i can achiveve it.

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

Post by ray.wurlod »

Try setting the abort count to 2, so that at least one row gets out.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Hello Ray,

Thanks. I tried that and the job is getting aborted but i dont see the first row written to the file instead a zero byte file is produced. I even tried using peek stage and from peek stage i have written to a Seq File. But in vain. Is there another way.

Thanks for the help
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

As DataStage runs in parallel mode, the abort may kill the process before the data is flushed into the file.

Simplest way will be to use a peek stage and pick the data from the logs.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Hello sainath,

Thanks for the reply. Can you help me how to pick the data from the log.
Post Reply