Order of execution

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Gius
Participant
Posts: 29
Joined: Mon Mar 09, 2015 2:10 am

Order of execution

Post by Gius »

Hello,
I have a parallel job and inside this parallel job I have 2 flows ( 2 sources and 2 target ).
Is it possible to do something like ;
# First run the first sources db2 and when it finish, run the 2d sources db2.
# If not then run the first flow, when it finish, run the 2d flow.

Right now I have 2 flows inside the parallel job, 2 sources with 2 target but I can merge the flows and like obtain 2 db2 sources and 1 target, in this case, is it possible to put an execution order to the db2 sources ?


# I don't want to create a second parallel job, ,I would like to do this inside 1 parallel job.
# All sources have the same output fields

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

Post by ray.wurlod »

You can't do it within a single parallel job as you've designed it.

You may be able to finagle something in the database, such as a stored procedure that executes one query then the next, but you can't do it in a single parallel job.

You can, of course, do it in a pair of parallel jobs run under the control of a sequence job or a job control routine/script.
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 »

Yeah, not in this tool. :wink:

Okay... sort of.. to clarify with a bit of revisionist history: That capability is not built into the tool as it is with at least one other that I'm now familiar with but can be accomplished with a bit of... shenanigans. As noted. :D
Last edited by chulett on Thu Mar 21, 2019 12:32 am, edited 2 times in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Aha!

Post by ray.wurlod »

Of course you can. Sort of. Add a constant to each query, maybe 'A' and 'B', then use a Sort Funnel to make sure that all the 'A' records go through before any of the 'B' records.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Aha!

Post by ray.wurlod »

ray.wurlod wrote:Of course you can. Sort of. Add a constant to each query, maybe 'A' and 'B', then use a Sort Funnel to make sure that all the 'A' records go through before any of the 'B' records.
If you don't want to alter the queries, use a Column Generator stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply