Db2 for z/OS - The AI Database

nested-group-icon.png

DB2

Expand all | Collapse all

Explanation of Field QW0021DR: "COMMIT" / "COMMIT+1"

Jump to Best Answer
  • 1.  Explanation of Field QW0021DR: "COMMIT" / "COMMIT+1"

    Posted Wed May 06, 2020 09:21 AM

    Hi,
    can someone explain the difference between "COMMIT" and "COMMIT+1" (QW002140 and QW002141)? 
    I can't find a description for these values ​​of the "Lock Duration" field.

    Thanks

    SDSNMACS(DSNDQW00)
    QW0021DR DS X * LOCK DURATION *
    QW002120 EQU X'20' * MANUAL *
    QW002121 EQU X'21' * MANUAL+1 *
    QW002140 EQU X'40' * COMMIT *
    QW002141 EQU X'41' * COMMIT+1 *
    QW002160 EQU X'60' * ALLOCATION *
    QW002180 EQU X'80' * PLAN *
    QW002181 EQU X'81' * UTIL @65*
    QW0021FE EQU X'FE' * INTEREST DURATION *
    QW0021FF EQU X'FF' * DURATION TO FREE ALL LOCKS *


    ------------------------------
    Peter Hartig
    ------------------------------


  • 2.  RE: Explanation of Field QW0021DR: "COMMIT" / "COMMIT+1"
    Best Answer

    Posted Thu May 07, 2020 02:43 AM
    LOCK DURATION
    The lock duration:
    COMMIT
    Until commit (QW0021DR=x '40')
    COMMIT+1
    Past commit; applies to locks needed to maintain the position for a cursor opened WITH HOLD (QW0021DR=x '41')

    https://www.ibm.com/support/knowledgecenter/SSUSPA_5.4.0/com.ibm.omegamon.xe.pm_db2.doc_5.4.0/ko2rr/r0021out.htm


    ------------------------------
    JAMES CAMPBELL
    ------------------------------



  • 3.  RE: Explanation of Field QW0021DR: "COMMIT" / "COMMIT+1"

    Posted Thu May 07, 2020 07:26 AM

    Thanks a lot James.

    We had "COMMIT+1" locks only on SKPTs (no other resources were involved).
    Now we realized that KEEPDYNAMIC(YES) was the reason for that holding the prepared statements in the local cache.
    With KEEPDYNAMIC(NO) the locks disapeared after a "normal" commit and the DBAT were disconnected.



    ------------------------------
    Peter Hartig
    ------------------------------