Sequence - Trigger - OK/Warning

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
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Sequence - Trigger - OK/Warning

Post 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.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Look at Craig's 3'rd reply in thispost.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Hi Poorna,

Check for Custom conditional trigger and define your logic there.

IHTH
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yes, True, I forgot that these numeric values can change. Thanks for jumping in Craig.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
sudharma
Participant
Posts: 55
Joined: Wed Jan 24, 2007 10:28 am

Post 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
sudharma
Participant
Posts: 55
Joined: Wed Jan 24, 2007 10:28 am

Post by sudharma »

poorna,

just specify without the brackets.


DSJS.RUNOK OR DSJS.RUNWARN


thanks
sudharma
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
AaronVG
Participant
Posts: 13
Joined: Thu Feb 15, 2007 4:02 pm

Post 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?
<<<>>>
My opinions are just that.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
AaronVG
Participant
Posts: 13
Joined: Thu Feb 15, 2007 4:02 pm

Post 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!
<<<>>>
My opinions are just that.
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Or We can do this, by specifying custom condition as
Activity variable.$jobstatus <= 2
Via
-------------------------------------
Learn all the way, as you Grow each Second
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Unsafe. Job status values can be negative if internal errors occur.
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