How do i check the return value of a routine ?

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
MOHAMMAD.ISSAQ
Participant
Posts: 78
Joined: Fri Mar 02, 2007 4:54 am
Location: CHENNAI

How do i check the return value of a routine ?

Post by MOHAMMAD.ISSAQ »

I'm calling a routine from a "Routine Activity" stage.
In the properties of the "Routine Activity" stage i set Trigger as "Return Vaue Conditional".

My routine will return value either '0' or '1'.
If the value is '0' then i'm calling the "UtilityAbortToLog" routine to abort the job Else just passing control to the other stage.

But the job while running it's not not aborting for value='0'.

Can anybody pls help me...

Waiting for valuable inputs..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Reverse your logic. By default an OK trigger fires if the return value is 0, a failure trigger fires if the return value is non-zero.
Otherwise create custom trigger to handle 0 as a failure, and a Failure trigger to handle your "1 is good" case.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MOHAMMAD.ISSAQ
Participant
Posts: 78
Joined: Fri Mar 02, 2007 4:54 am
Location: CHENNAI

Post by MOHAMMAD.ISSAQ »

Thanks ray for the help.
I created a custom trigger and now everything it's fine...

Thanks again....
Post Reply