Hi
We have a sequence of which the execution flow as follows,
At the first job we are taking out some rows from database and putting into hash file / Seq file.
now the if no. of rows = 0 , sequence should be stop executin after this job else sequence should executed
I have designed the sequence as below.
In the job activity I have called the first jo where I am taking the row-counts of the file, Then I have defined a routine which is counting the number of rows getting written to the link.
Routine takes three arguments (JobName,StageName,LinkName) and gives the count.
This count value I am capturing in to the activity variable and defining the "Custom-Conditional" Trigger, if the count value is more than 0 then execute the Sequence else Terminate the Sequence.
This design is working fine when the number of records are 0 at first job ,but when records are more than zero the routine is giving warnings saying as
"REQ_Delete_Seq_Terminator..JobControl (@count_check): Routine DSU.countcheck did not finish OK, return code = '2'
"REQ_Delete_Seq_Terminator..JobControl (@count_check): Controller problem: Unhandled failure (2) encountered calling routine DSU.countcheck"
For terminate the Sequence I am using terminator stage,but drawback of this stage is that it is aboarting the sequence but we don't want the abort we want that the sequence should come out of execution flow without abortion.
Plz guide on same
Controller problem: Unhandled failure (2)encountered calling
Moderators: chulett, rschirm, roy
Nah... it's the standard 'problem' with any routine that returns a non-zero result and the 'Automatically handle activities that fail' option in a Sequence job.
Discussed here a bajillion times and documented in the online help. You need to use two triggers so that the Sequence job thinks you have handled the failure so it doesn't need to. For example:
1) Use an OK (Conditional) trigger to catch the zero result. Link it to a Sequencer so the flow just stops.
2) Use an Otherwise trigger to continue the job flow when the return value is non-zero.
That's one way.
![Wink :wink:](./images/smilies/icon_wink.gif)
Discussed here a bajillion times and documented in the online help. You need to use two triggers so that the Sequence job thinks you have handled the failure so it doesn't need to. For example:
1) Use an OK (Conditional) trigger to catch the zero result. Link it to a Sequencer so the flow just stops.
2) Use an Otherwise trigger to continue the job flow when the return value is non-zero.
That's one way.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers