Page 1 of 1

Triggers in a Sequence job

Posted: Wed Jan 02, 2013 3:44 am
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 ?

Posted: Wed Jan 02, 2013 7:41 am
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?

sequencer triggers

Posted: Wed Jan 02, 2013 8:22 am
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.

Posted: Wed Jan 02, 2013 8:45 am
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.

Posted: Thu Jan 03, 2013 3:02 am
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'

Posted: Thu Jan 03, 2013 4:30 am
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.

solved

Posted: Thu Jan 03, 2013 6:21 am
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 !

Posted: Thu Jan 03, 2013 8:35 am
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.

Posted: Thu Jan 03, 2013 8:58 am
by uzl
oops :oops:

Posted: Thu Jan 03, 2013 9:11 am
by chulett
No worries, we good now. :wink:

Re: solved

Posted: Mon Jan 07, 2013 2:33 am
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 ?

Posted: Mon Jan 07, 2013 7:01 am
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.