Job sequence issue need help

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
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Job sequence issue need help

Post by mandyli »

Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man
Yuan_Edward
Participant
Posts: 73
Joined: Tue May 10, 2005 6:21 pm
Location: Sydney

Re: Job sequence issue need help

Post by Yuan_Edward »

mandyli wrote:Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man
I guess it will be something like this:

JobActivity1.$JobStatus = DSJS.RUNOK Or JobActivity1.$JobStatus = DSJS.RUNWARN

JobActivity1 is the Job Activity Stage name.
Edward Yuan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly. From a custom trigger.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sambit
Participant
Posts: 52
Joined: Mon Sep 05, 2005 4:59 am

Post by sambit »

Hi All,
I have a question here on the triggers. I have a sequencer which executes 10 jobs. I want to abort my job if any of these jobs has warnings or failure. So, what should I put in triggers? Since, all the 10 links are linked to one sequencer stage which is later linked to Job Activity stage where I have the triggers. Do I have to put the triggers the following way,

JobActivity1.$JobStatus = DSJS.RUNFAILED Or JobActivity1.$JobStatus = DSJS.RUNWARN or JobActivity2.$JobStatus = DSJS.RUNFAILED Or JobActivity2.$JobStatus = DSJS.RUNWARN or JobActivity3.$JobStatus = DSJS.RUNFAILED Or JobActivity3.$JobStatus = DSJS.RUNWARN
Thanks !!!
Sambit
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's probably easier not to handle failures through triggers and emplace an Exception Handler. This has activity variables that can be used to report which activity failed and why.

Check the "automatically handle activities that fail" check box in the job sequence compilation options.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
amarpatkar
Participant
Posts: 7
Joined: Thu Apr 19, 2007 10:22 pm
Location: Melbourne

Re: Job sequence issue need help

Post by amarpatkar »

mandyli wrote:Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man
I would recommend the following custom trigger which has always worked for me.

JobActivity.$JobStatus = 1 OR JobActivity.$JobStatus = 2 OR JobActivity.$JobStatus = 11 OR JobActivity.$JobStatus = 12 OR JobActivity.$JobStatus = 13

Where values:
--------
1 = Finished OK
2 = Finished with warnings
11 = Validate OK
12 = Validate with warnings
13 = Validation failed

You may wish to drop a couple of these depending on what you are trying to achive.

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

Post by ray.wurlod »

You're in trouble if "they" ever change the values, Amar. That's why the mnemonics such as DSJS.RUNOK are to be preferred.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which is why the original answer posted 2 months ago used the mnemonics. Never mind the fact they are much more obvious as to their intent than just the numeric values.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply