How to control execution of multiple threads

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
manojmmx
Participant
Posts: 8
Joined: Tue May 09, 2006 2:45 am
Location: Pune

How to control execution of multiple threads

Post by manojmmx »

While multiple threads are executing the same instance of map, in TX eventserver, is there any way to control the relative execution of these threasds....example below.
Thread1 is running a Credit transaction.
Thread2 is running a Debit transaction.

i want to make sure that the Credit transaction gets processed first and then the debit transaction should be processed. Is there any way to STOP, WAIT, SLEEP the running threads.
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

Seems like there's a lot of ways to address this question but it really depends on your environment and restrictions? Don't think we have enough info to give you a solid answer.

Are you looking for matching credits and debits? an example might be.. you are processing debits & credits for multiple accounts and only need to be concerned when about a debit is when an account/customer/etc has a related credit? Other wise the debits can be processed as they come in the door?

Is your trigger the same for credits and debits?

Are you performing real-time updates? More to the point can you hold debit processing until all credits are handled? Can you map the all data to a common file, sort and process from there? Or use a DB?
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

I think this is a design issue. You should ensure that your data is in the correct order and process through a single thread.
Post Reply