If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Sqlcode

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-09, 06:09
padmavathi7 padmavathi7 is offline
Registered User
 
Join Date: Aug 2009
Posts: 1
Sqlcode

Hi All,

I am working on mainframe..
I have a cobol-db2 program which is calling another cobal-db2 lowlevel program.
The lowlevel program is getting failed with the -911 on some cursor declared in it
So the control is back to the main program.
I need to check the SQLCODE of the lowlevelprogram in the high level program,but here the problem is the lowlevel program is not passing the information about the SQLCODE to the main program.
My query is, is there is any way to get that lowlevel cobol program SQLCODE with out changing the lowlevel program?
like if the DB2 is storing the latest executed query result in any varible or table kindof thing?
Please reply me if you know...
Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 08-10-09, 10:10
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Not to my knowledge. You need to get the calling program to dump the entire SQLCA when it gets an error like that from Db2.

However, on DB2 for LUW, -911 (deadlock or lock time out) usually show up in the db2diag.log. I don't recall if DB2 z/OS has a similar log or whether it shows up on system console. Ask your DB2 systems programmer about it.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On