Page 1 of 1

Locking mechanism within job

Posted: Fri Sep 21, 2012 6:34 am
by samarvind
Hi All,

I have a requirement where I need to perform an action after operations on all target stages are complete like Eg

Source ----> Transformer ------> target 1 (target table)
---------> target 2 (reject table)

I want to perform an action after both operations to target1 and target2 is complete which is executed in parallel . Is this possible and could anyone explain how we can do it?

I know my subject is bit absurd but I dont how to articulate this piece of requirement :oops:


Thanks
Arvind

Posted: Fri Sep 21, 2012 6:58 am
by pnpmarques
What type of action, an sql statement?
If so, try 2 possible ways:
- Run an after sql statement in one of the target stages. I believe they end at the same time as the rejection link(to table 2) is only active while there are records being sent to table 1.
- Do it in another job, and link them on a Sequence job.

Posted: Fri Sep 21, 2012 7:34 am
by samarvind
I cannot run an after SQL statement on one target table as other might be still running. I want this to happen only when both the operations are done completely and in the same job

Posted: Fri Sep 21, 2012 7:41 am
by chulett
That "in the same job" part would be possible in a Server job but I'm not sure you can in a Parallel one... hmmm...

Posted: Fri Sep 21, 2012 8:02 am
by samarvind
Yes, you are right, we have done such scenarios in server job wondering now how to do it in parallel ...

Posted: Fri Sep 21, 2012 9:28 am
by Mike
In a parallel job, you could use the Distributed Transaction Stage (which requires Websphere MQ).

Mike

Posted: Fri Sep 21, 2012 9:57 am
by pnpmarques
Assuming your job is:
Source ----> Transformer ------> target 1 (target table) ---------> target 2 (reject table)
And that Help says:
When the Oracle connector includes a reject link, records that meet specified reject criteria are automatically routed to the target stage on the reject link, and processing continues for the remaining records.

After reading this do you believe that the after-sql statement in either targets may run before any of them finishes completely?