Results 1 to 2 of 2

Thread: Sqlcode

  1. #1
    Join Date
    Aug 2009

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts