Afterjob Subroutine in parallel job paramete

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
kamaldeep.kaur
Participant
Posts: 17
Joined: Thu Oct 26, 2006 12:47 am
Location: chennai

Afterjob Subroutine in parallel job paramete

Post by kamaldeep.kaur »

Hi all,

I have written a small script to load data from sequential file to table and kept that in After Job Subroutine.Script fails as table was not present in database but didn't abort the job. Job finished with warnings.

I want the job to abort whenever the scripts does not run properly.
Please help.

Thanks in advance
kamal
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

As default only before routines fail/abort on error code = 1, where as after routines only write a warning to the log.

So - maybe you can write your own version of ExecSH (I'm guessing that it is the one you are using?) where you abort the job on failure (still just a best guess).
_________________
- Susanne
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Afterjob Subroutine in parallel job paramete

Post by SURA »

How can we change the status of a job?

I am not sure how much it is possible / It may not be the easy to do!

Let us wait for Gurus answer.

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

Post by ray.wurlod »

In an after-job subroutine, as Susanne noted, setting ErrorCode to a non-zero value will cause the job to abort when the subroutine returns. Do NOT try to abort the job from within the subroutine. It leaves locks if you do.
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