Sequencer-Routine Activity-Triggers

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
subramanya
Participant
Posts: 22
Joined: Fri Oct 15, 2004 11:53 pm
Location: Bangalore, India
Contact:

Sequencer-Routine Activity-Triggers

Post by subramanya »

Hi,
In a Sequencer job, I am executing a routine in the routine activity stage and later a job. If Triggers -- Expression Type is specified as "OK - (Conditional) in the routine activity stage then my job is not triggerred. If you give "Unconditional" or "Failed-(Conditional)" then the job will be triggerred. This leads to the conclusion that the routine is invalid. But the routine is fine. What could be the problem?

Also no entries are made in the job log about routine activities(Like "Starting routine stage activity" or "Finishing routine stage activity"

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

Post by chulett »

What kind of values does the routine return? Anything other than a zero is considered to be a failure, so you have to take that fact into account when designing the triggers or error handling.
-craig

"You can never have too many knives" -- Logan Nine Fingers
subramanya
Participant
Posts: 22
Joined: Fri Oct 15, 2004 11:53 pm
Location: Bangalore, India
Contact:

Post by subramanya »

Hi,
The routine is getting the time when the job last run. What i wanted was if the routine executed without any error, then the job should execute with the parameter retured from that routine. But now it looks that I shud give "Unconditional" in the Expression Type. Is there any method to make sure that the routine is excuted properly.
Thnx a lot for the info.

Thnx
Subs
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Custom trigger and detect that something other than was requested was returned. For example Len(returnvalue) <> 19 (assuming that it returns an ISO 8601 TimeStamp).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or specifically trap your errors in the Routine and return something easily recognizable. I usually pass back negative numbers as long as normal returns can never be negative and them check for that in a custom trigger. Or as Ray noted, check the size of what you return.
-craig

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