Conditional Job Start from Routine 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
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Conditional Job Start from Routine Value

Post by shrey3a »

Hi,

I need to start or abort the job based on the return value of the routine.

Scenario

I've a routine which I'm planning to call in sequencer thro' routine stage the routine returns the value 1 and 0 , I need to start the Datastage job if the value is 1 and do not start the job if value is 0.


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

Post by chulett »

Simple enough with a Nested Condition stage. Have it check the return status and either go down a link that runs your job or a second link that bypasses it. Both should end at a Sequencer stage set to 'Any' if the job stream needs to continue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

Hi Craig,


How to check the return status of routine in Nested condition stage.
It do not give the option to do it.

The scenario is If the routine returns the value 44 the run the job else do not run the job.

Regards


chulett wrote:Simple enough with a Nested Condition stage. Have it check the return status and either go down a link that runs your job or a second link that bypasses it. Both should end at a Sequencer stage set to 'Any' if the job stream needs to continue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's an "activity variable" in your job sequence.
RoutineActivityName.$ReturnValue
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 »

Yup, just like that. :wink:

And make sure you understand that RoutineActivityName in Ray's example is the name of the preceeding Routine Activity stage itself, not the routine it is calling.
-craig

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