View previous topic :: View next topic
|
Author |
Message |
atulbaviskar
New User
Joined: 08 May 2008 Posts: 8 Location: Mumbai, India
|
|
|
|
Hello Frends,
Tran A and Tran B are the two ONLINE transactions and resource are VSAM Files.
Tran A owns Resource 1 for which Tran B is waiting and
Tran B owns Resource 2 for which Tran A is waiting.
So, a deadlock occurs.
I tried to resolve it using Enq/Deq using the following seq in my program
Enq
Read
Update/Rewrite
Deq
But it does not solve my purpose. The other way I tried is to Force kill one of the transaction using FC in CICS environment, but i believe this is temporray solution.
Please suggest.
Thanks,
Atul |
|
Back to top |
|
|
Srinivasa Rao
New User
Joined: 21 Jun 2005 Posts: 75
|
|
|
|
Hi Atul,
While defining your transactions use the parameter DTIMOUT. If your transactions are waiting for more than specified time one of the transaction will abend.
If your find out other solution let us know. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
You need to ENQ/DEQ logic in both programs (Tran1 and Tran2) ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
The classic solution is to ensure both programs access the resources in the same sequence, which prevents deadlocks from occurring. |
|
Back to top |
|
|
|