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
 

 

How would a CICS transaction result in DB2 deadlock(-911)?

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

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Oct 21, 2011 7:23 am    Post subject: How would a CICS transaction result in DB2 deadlock(-911)?
Reply with quote

Everytime I issue a transaction which calls a DB2 subprogram, after successful execution, I view the DB2 table to check the processing result through SPUFI, the screen is locked. But at this time, when I issue " CEMT I TASK(*)' to check if any task is using the table or not, but there is no running tasks.

and after a while, SPUFI returns with SQLCODE -911.


How can this happen? how should I find out the culprit?

WOuld you please give me some hint on this? thanks.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 21, 2011 7:45 am    Post subject:
Reply with quote

Quote:
CEMT I TASK(*)' to check if any task is using the table or not, but there is no running tasks.
If your programs are written as pseudo-conversational programs, MOST of the time they will not show up on a CEMT I TAS since when the program is done and does the EXEC CICS RETURN TRANSID the task is completed and hence won't show up. I know CICS hands the work to the DB2 subsystem for processing; I suspect that CEMT I TAS might not show DB2 subsystem activity but I cannot say for sure since it's been a LONG time since I worked on a system running DB2.
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 Oct 21, 2011 9:01 am    Post subject:
Reply with quote

Hello,

I suspect that spufi is getting a timeout rather than a deadlock.

I also suspect you are locking "things" whren it is not necessary.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Oct 21, 2011 10:57 am    Post subject:
Reply with quote

not knowing anything about the tables, the activity or the setup,
insure that you are always using WITH UR in your spufi SELECTs
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Oct 21, 2011 11:26 am    Post subject:
Reply with quote

as in batch,
when a cics task requests a db2 service,
the requesting task (batch or cics) is 'suspended', awaiting a return from db2.

db2 will provide a service - for a batch/cics task.
i can think of no time db2 will be performing a service for a non-existent task.

so, if you are receivng a -911,
of which you receive also a reason code and a type of resource code
which you did not bother to share or look/up
which is usually helpful in determining the cause
i would suggest that something else is affecting the DB,
other than your non-existant CICS trans.

just for grins, try the cemt inq before you do the spufi.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Oct 21, 2011 11:34 am    Post subject:
Reply with quote

also,
any db2 threads started by a batch/cics tasks
will be terminated when the batch/cics task terminates,
whether it is a commit or rollback depends on what parms the tasks sent to db2.
and sometimes this rollback (or commit) takes a long time.

a good example is a spufi update of a gazillion rows.
if you terminate the spufi session or the tso session supporting the spufi task,
prior to db2 completing the update and commit,
it takes (sometimes) a long time for the tso/ispf session to terminate
and your are allowed to sign back on.
it takes a while for db2 to rollback all the changes and return to tso/ispf
and allow the tso/ispf session to really terminate.

but the above case would still have the transid as active,
until db2 finishes and the cics task terminates.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


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