Locking mechanism within job

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
samarvind
Participant
Posts: 29
Joined: Wed Jan 18, 2006 6:13 am
Location: Sutton, Surrey

Locking mechanism within job

Post 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
Thanks & Regards
arvind sampath
Software Engineer
pnpmarques
Participant
Posts: 35
Joined: Wed Jun 15, 2005 9:27 am

Post 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.
Last edited by pnpmarques on Fri Sep 21, 2012 9:34 am, edited 1 time in total.
samarvind
Participant
Posts: 29
Joined: Wed Jan 18, 2006 6:13 am
Location: Sutton, Surrey

Post 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
Thanks & Regards
arvind sampath
Software Engineer
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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...
-craig

"You can never have too many knives" -- Logan Nine Fingers
samarvind
Participant
Posts: 29
Joined: Wed Jan 18, 2006 6:13 am
Location: Sutton, Surrey

Post by samarvind »

Yes, you are right, we have done such scenarios in server job wondering now how to do it in parallel ...
Thanks & Regards
arvind sampath
Software Engineer
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

In a parallel job, you could use the Distributed Transaction Stage (which requires Websphere MQ).

Mike
pnpmarques
Participant
Posts: 35
Joined: Wed Jun 15, 2005 9:27 am

Post 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?
Post Reply