Triggers in a Sequence job

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
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

Triggers in a Sequence job

Post by uzl »

I don't understand this. Does this mean that triggers don't work in a sequence ? I tried the following. For a Job Activity I have two triggers :
file_to_stage OK
file_to_stage_fail Custom : NOT(DSJS.RUNOK)

If the job gives a warning the sequence is stopped. Neither trigger is executed ?

I also tried :
file_to_stage OK
file_to_stage_fail Custom : RUNFAILED OR RUNWARN
But the result is the same. What am I doing wrong ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course triggers work, wouldn't be much point to the Sequence jobs without them. :wink:

Rather than pick and choose specific status values, try using an "OK" and an "Otherwise" trigger. Are you trying to implement what Kim posted?
-craig

"You can never have too many knives" -- Logan Nine Fingers
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

sequencer triggers

Post by uzl »

I've tried OK and Otherwise with the same result.

This is what I want to implement : if a job in a sequence ends with status "OK", the following job can be launched. In all other cases, a notificiation and terminator job must be launched.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, not really related to the original topic so off you go to one of your own.

Now... "same result". Are you saying that a Job Activity where the job completes with warnings does not fire the Otherwise trigger? Can you tell us what compilation options you have enabled in the Sequence and what warnings or messages you are seeing in the log? Your requirement shouldn't require anything more than you've posted.

I'd also be curious what exact 8.x version you are on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

Post by uzl »

We are using version 8.7.
We have not selected any compilation settings.

The warning in the job:
ADNrKey_sp,0: Warning: debFaktuurDim_File_to_Stage.ADNrKey_sp: [DataDirect][ODBC lib] Invalid argument value

The warning in the sequence:
debFaktuurDim_File_to_DWH..JobControl (DSWaitForJob): Job debFaktuurDim_File_to_Stage has finished, status = 2 (Finished with warnings)
debFaktuurDim_File_to_DWH..JobControl (@debFaktuurDim_File_to_Stage): Job debFaktuurDim_File_to_Stage did not finish OK, status = 'Finished with warnings'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

NOT(DSJS.RUNOK) is not a complete expression to use in a trigger. DSJS.RUNOK is a DataStage constant. Against what are you comparing it? Perhaps you need to lose the NOT and use a "not equals" operator.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

solved

Post by uzl »

If have used OK and Otherwise again and now it works. I'am pretty sure that I had tested this but anyway, at least now it works as I want it.
Thanks for the replies !
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

uzl wrote:I have created a new topic :

Code: Select all

http://www.dsxchange.com/viewtopic.php?p=434760#434760
Why? :?

I didn't ask you to, rather I told you that I had already done that for you.

FYI - I've removed that post and relocated the additional information you put there back in this thread.
-craig

"You can never have too many knives" -- Logan Nine Fingers
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

Post by uzl »

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

Post by chulett »

No worries, we good now. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
uzl
Premium Member
Premium Member
Posts: 20
Joined: Mon Jul 23, 2012 4:33 am

Re: solved

Post by uzl »

uzl wrote:If have used OK and Otherwise again and now it works. I'am pretty sure that I had tested this but anyway, at least now it works as I want it.
Thanks for the replies !
The problem is that I can't use OK en Otherwise for the last job in a sequence. I tried "<> DSJS.RUNOK" but that doesn't work. Any suggestions ? I could create a dummy job as last job ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Run them to a Sequencer set to 'Any' - that in effect becomes your 'dummy job' and the end point of the sequence of tasks.
-craig

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