Routine returns non-zero value

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Routine returns non-zero value

Post by asitagrawal »

Hi,

In my Job Sequence, I have :

Code: Select all

Job 1 -------> Routine1=====> Sequencer1-------> Job 2
Between Routine1 and Sequencer I have put 2 links..
Link1 is Conditional, with Routine1.ReturnValue = 1 (say i.e non zero) and hence It should run Job2 else not
Link2 is Otherwise (Coz I am using Automatically Handle Activities that fail and hence the Sequence will not abort in case a non-zero value is returned by the routine)

The mode of sequencer is Any.

Now, my condition is that the Job2 should run if and only if the return value of routine is 1 , otherwise not to run it. But as I have put Otherwise link, the Job2 continues to run in case some other value is returned, which I dont want.
I dont want to remove Otherwise link else the job will abort if 1 is returned by the routine.

Plz suggest.
Regards,
Asit.

PS: The use of otherwise link was found as a result of search in the forum.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Job1>>>RoutineActivity>> Two output links

Link1(return value=1) to Job2
Link(Any) to EmailActivity or Whatever you want to do if routines return value is other than one.

No sequencer required. And which post are you talking about?
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

us1aslam1us wrote:Job1>>>RoutineActivity>> Two output links

Link1(return value=1) to Job2
Link(Any) to EmailActivity or Whatever you want to do if routines return value is other than one.
I dont want to do any activity if a value other than, say 1, is returned.
it is like if return value = 1 the Job 1 else the sequence finishes....


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

Post by chulett »

Don't send your Otherwise link through the Sequencer to Job2, that defeats the whole purpose of it. Send it to another Sequencer, that will 'dead end' the link and the Sequence job will stop. Remove the Sequencer from the Job2 link, you don't need it after that change.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

chulett wrote:Don't send your Otherwise link through the Sequencer to Job2, that defeats the whole purpose of it. Send it to another Sequencer, that will 'dead end' the link and the Sequence job will stop. Remove the Sequencer from the Job2 link, you don't need it after that change.
So what u mean to say is that, the Otherwise link shud go into a Sequencer which further has no more links and the Conditional link can directly go into the Job2 ?
Please explain
..... and the Sequence job will stop
.
The Sequence stops means the Sequence will end with Status Finish[Ok] and not Stopped ????


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

Post by chulett »

asitagrawal wrote:So what u mean to say is that, the Otherwise link shud go into a Sequencer which further has no more links and the Conditional link can directly go into the Job2 ?
Yes.
asitagrawal also wrote:The Sequence stops means the Sequence will end with Status Finish[Ok] and not Stopped ????
Yes - 'stop' as in 'end' as in 'Finish Ok'. Poor word choice in hindsight, I guess.
-craig

"You can never have too many knives" -- Logan Nine Fingers
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

What you understood is fine but :idea: Can you test it yourself?
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Post Reply