DSJS.RUNFAILED not working in custom trigger

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

DSJS.RUNFAILED not working in custom trigger

Post by manojbh31 »

Hi All,

I have job (J1) which will fail and next job J2 should be triggered which is present in seqeunce. I have custom trigger as below

Activity name.$JobStatus = DSJS.RUNFAILED OR Activity name.$JobStatus = DSJS.RUNWARN,

But Job 2 is not triggered and it is not saying any error. Please help
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the actual exit status (e.g. from Director) of Job1 ?

In your scenario, if Job1 finishes with any status other than the two explicitly mentioned, Job2 will not be triggered. This includes not only DSJS.RUNOK (which is your intention) but also any other status such as DSJS.CRASHED.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Since new status codes are occasionally added (such as at version 11 to account for queued jobs), it might be better and safer to use

Code: Select all

Activity name.$JobStatus <> DSJS.RUNOK
in this check. There might be another error status being set by the activity - in that case do as Ray suggested and print out the actual numeric value of the return code.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post by manojbh31 »

Thanks for response.
Below are the details present in Director with exit status

JOB1 has finished, status = 3 (Aborted)
JOB1 did not finish OK, status = 'Aborted'
Controller problem: Unhandled abort encountered in job

Seq S1 JobControl (@Coordinator): Summary of sequence run
Sequence started (checkpointing on)
JOB 1 started
JOB 1 finished, status=3 [Aborted]
Exception raised: @JOB, Unhandled abort encountered in job JOB1
Sequence failed (restartable)
Controller problem: Unhandled abort encountered in job


and i tried with $JobStatus <> DSJS.RUNOK this is also not working, I am using custom trigger. Once the Job1 is abroted next trigger is not working or next job is not kicked. If i use Failed expression type it is working
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The log entries indicate that your job call has no condition set for "fail", so it fails immediately.

Could you cut-and-paste your custom condition to this thread? I think there might be an error in there.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post by manojbh31 »

Jb_Step01.$JobStatus <> DSJS.RUNOK
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post by manojbh31 »

I have 2 output links both have custom trigger as below

1) Jb_Step01.$JobStatus = DSJS.RUNOK OR Jb_Step01.$JobStatus = DSJS.RUNWARN

2) Jb_Step01.$JobStatus <> DSJS.RUNOK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Second one should be set to 'Otherwise' unless you were purposefully wanting the overlap between the two.
-craig

"You can never have too many knives" -- Logan Nine Fingers
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post by manojbh31 »

Yes Agreed, But i want both failed and warning in second link so i am using custom and providing RUNFAILED and RUNWARN.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In the sequence job properties do you have automatic handling of job failures enabled? Try disabling it.
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