Page 1 of 1

Sequence - Trigger - OK/Warning

Posted: Mon Mar 19, 2007 2:25 pm
by poorna_76
Hi All,

I have 3 jobs running Sequentially in a Sequence.

The second job runs (parallel job) with acceptable warnings for the intial run. The consecutive runs will not have warnings for the same job.

I would like to specify in the Trigger
OK - (Conditional) or Warning - (Conditional)

How should i do that?

Thanks in Advance.

Posted: Mon Mar 19, 2007 2:32 pm
by DSguru2B
Look at Craig's 3'rd reply in thispost.

Posted: Mon Mar 19, 2007 2:33 pm
by us1aslam1us
Hi Poorna,

Check for Custom conditional trigger and define your logic there.

IHTH

Posted: Mon Mar 19, 2007 2:39 pm
by chulett
DSguru2B wrote:Look at Craig's 3'rd reply in thispost.
Actually, keep on going and read Ray's reply to my post. That was before I knew I should be using the DataStage constants like DSJS.RUNOK rather than the numeric equivalents like a '1'.

Posted: Mon Mar 19, 2007 2:48 pm
by DSguru2B
Yes, True, I forgot that these numeric values can change. Thanks for jumping in Craig.

Posted: Mon Mar 19, 2007 3:30 pm
by sudharma
Poorna,

Open your job activity in the sequence.
Go to the triggers Tab
on the job link, select expression type as Custiom (conditional)
and in the expression just specify this

(DSJS.RUNOK OR DSJS.RUNWARN)

this means that the jobs in your sequence will run even if they have any warnings or even if they run OK.

thanks
sudharma

Posted: Mon Mar 19, 2007 3:31 pm
by sudharma
poorna,

just specify without the brackets.


DSJS.RUNOK OR DSJS.RUNWARN


thanks
sudharma

Posted: Mon Mar 19, 2007 3:39 pm
by chulett
sudharma wrote:DSJS.RUNOK OR DSJS.RUNWARN
No. If you think that is working for you - it's not. That "expression" evaluates to TRUE 100% of the time.

You absolutely need to provide an expression - like "X = Y" - in order for it to resolve properly.

Posted: Thu Mar 22, 2007 3:24 pm
by AaronVG
I have the same question. I looked over the post that was linked, but I either do not fully understand or I am having trouble translating into a single Job Sequence, rather than a sequence of sequences.

My Job Sequence is 3 jobs executed in serial, each of the subsequent jobs can run on an "Executed OK" or "Execution finished with warnings" from the previous.

As chulett said, DSJS.RUNOK OR DSJS.RUNWARN does not work. Does someone have a Custom (conditional) that does work?

Posted: Thu Mar 22, 2007 3:29 pm
by chulett
It's in the linked posts, but to bring it here:

Code: Select all

stage_label.$JobStatus = DSJS.RUNOK Or stage_label.$JobStatus = DSJS.RUNWARN
stage_label meaning the name of the Job Activity stage to check.

Posted: Fri Mar 23, 2007 6:52 am
by AaronVG
chulett wrote:It's in the linked posts, but to bring it here:

Code: Select all

stage_label.$JobStatus = DSJS.RUNOK Or stage_label.$JobStatus = DSJS.RUNWARN
stage_label meaning the name of the Job Activity stage to check.
I missed it, I apologize. Thank you!

Posted: Thu Mar 29, 2007 9:45 am
by via
Or We can do this, by specifying custom condition as
Activity variable.$jobstatus <= 2

Posted: Thu Mar 29, 2007 3:56 pm
by ray.wurlod
Unsafe. Job status values can be negative if internal errors occur.