Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Deadlocks in two instances of a cobol code.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Mon Mar 03, 2008 5:32 pm    Post subject: Deadlocks in two instances of a cobol code.
Reply with quote

Hi all,

I am finding frequent deadlocks between two instances of a online COBOL code. The deadlocks occur at a DML statement (ERASE or MODIFY). The control goes well into the deadlock handling paragraph and the deadlock recovery for one of the task is also successful.

Two DC001000 messages are written into the logs (One for each task in deadlock). And subsequently one of the task is rolled back. icon_sad.gif

Could any one please help? Can I avoid these messages getting written into the logs and the transaction getting rolled back? icon_confused.gif
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Mar 03, 2008 5:59 pm    Post subject: Deadlocks in two instances of a cobol code.
Reply with quote

I'm going to take a SWAG and assume this is a CICS problem?

If this is CICS, there is a keyword ERASE for several BMS commands, but I'm not familiar with a MODIFY command nor keyword.

Please elaborate....

Regards,

Bill
Back to top
View user's profile Send private message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Mon Mar 03, 2008 6:10 pm    Post subject: Reply to: Deadlocks in two instances of a cobol code.
Reply with quote

Bill,

Many thanks for your reply!
MODIFY or ERASE I am talking about is an IDMS data modification statement.
I am not using CICS. The program is a IDMS-DC online COBOL program that is using backend as IDMS and the DC storage variables.

Hope I made it clear this time. Please give me a shout if some thing is unclear or required.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Mar 03, 2008 8:00 pm    Post subject: Deadlocks in two instances
Reply with quote

Unfortunately, I don't speak IDMS and perhaps one of the other members may have an opinion regarding this problem.

Regards,

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 04, 2008 9:44 am    Post subject:
Reply with quote

Hello,

Quote:
Two DC001000 messages are written into the logs (One for each task in deadlock). And subsequently one of the task is rolled back


Quote:
Can I avoid these messages getting written into the logs and the transaction getting rolled back?


Unfortunately, i don't speak IDMS either, but i believe the following may relate to your situation.

When you say "deadlock", is this the same as a "fatal embrace"?

To reach this impasse one task "locks" a resource in tableA and another task "locks" a resource in tableB. Then the first task tries to lock the resource already held by the second task. So far, so good. So far, no deadlock. The deadlock occurs when the second task tries to lock the resource already being held by the first task.

Most often this is caused by the tasks locking resources in different sequences. I'd suggest you look at the problem program(s) and see if there are multiple processes that would lock resources in multiple sequences.

Something i've seen multiple places is when code needs to lock "header" and "detail" data and one process locks the header first and another process locks the detail first. This is a deadlock just waiting to happen. Usually, it will happen when transaction volumes are increasing or when the system becomes bottlenecked and locks are not freed quickly enough.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us