Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us