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
 

 

Exclusive table lock for a job to avoid -911

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Wed Jun 30, 2010 6:39 pm    Post subject: Exclusive table lock for a job to avoid -911
Reply with quote

Hi,

One of my job often fails with -911 contention with the same another job belonging to a different subsystem. I want to do a permanent fix by giving my job an exclusive lock of the table which both of it uses. Please can anybody advice me on how to modify my 'update table' statement in the program so that it gets an exclusive lock and avoids this contention?
Back to top
View user's profile Send private message

ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Jun 30, 2010 6:44 pm    Post subject:
Reply with quote

So what will happen to the other job when it try to access the table -911 right ? So probably the user in the other subsystem will also be thinking in the same line. Why not schedule the jobs to run at different times ?
You need to lock the table exclusively at the start of your program or before you apply any updates or deletes.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Jun 30, 2010 6:47 pm    Post subject:
Reply with quote

Quote:
so that it gets an exclusive lock and avoids this contention?


and locks-out the other job?

as often is the case, the design is at fault.

exclusive locks should not be used by those who want to implement them without knowing how.

-911's come with a reason code. so start there.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Jun 30, 2010 6:54 pm    Post subject:
Reply with quote

use IBM's error LookAt Site which will point you to the reference material,
which will tell you where to find the reason code explanations.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Jul 01, 2010 3:33 pm    Post subject:
Reply with quote

LOCK TABLE statement ?
But of course it is still bad practice .
Contention have to be solved at a scheduling level and/or commit frequency.
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: Thu Jul 01, 2010 7:51 pm    Post subject:
Reply with quote

Hello,

Suggest you consider changing the design of the conflicting processes. . .

The systems i support do not permit table locking - it is rejected when the process is in the review/promotion process. Why should we go back to single-user mode just because some processes are poorly designed icon_neutral.gif

A simple "do nothing" solution might be to properly schedule these so they do not run concurrently. . .
Back to top
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Fri Jul 02, 2010 10:30 am    Post subject:
Reply with quote

Hi,
Thanks for all your help...I am currently working with the other subsystem's scheduler to sort this out...and He's suggesting that we set a dependency to our job on their job as ours is not so critical one...lets see what comes out of it...Thanks a lot again for your help.

Regards,
Souren
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: Fri Jul 02, 2010 7:43 pm    Post subject: Reply to: Exclusive table lock for a job to avoid -911
Reply with quote

You're welcome - good luck icon_smile.gif

d
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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