Summarization of DRDA® blocking rules

In summary, what these rules (including the notes) say is that in the absence of certain special or unusual conditions, blocking will occur in both of the following cases:

Notes:
  1. A cursor is updatable if it is not read-only (see note 3), and one of the following is true:
    • The select statement contained the FOR UPDATE OF clause, or
    • There exists in the program an UPDATE or DELETE WHERE CURRENT OF against the cursor.
  2. A cursor is potentially updatable if it is not read-only (see note 3), and if the program includes an EXECUTE or EXECUTE IMMEDIATE statement (or when connected to a non-iSeries server, any dynamic statement), and a precompile or bind option is used that caused the package default value to be single-row protocol.
    • For DB2 Universal Database for iSeries, this is the ALWBLK(*READ) precompile option (the default).
    • For DB2, this is CURRENTDATA(YES) on BIND PACKAGE (the default).
    • For DB2 Universal Database for VM, this is the SBLOCK keyword on SQLPREP.
    • For DB2 for OS/2® (DB2/2), this is /K=UNAMBIG on SQLPREP or SQLBIND (the default).
  3. A cursor is read-only if one or more of the following conditions are true:
    • The DECLARE CURSOR statement specified an ORDER BY clause but did not specify a FOR UPDATE OF clause.
    • The DECLARE CURSOR statement specified a FOR FETCH ONLY clause.
    • The DECLARE CURSOR statement specified the SCROLL keyword without DYNAMIC (i5/OS™ only).
    • One or more of the following conditions are true for the cursor or a view or logical file referenced in the outer subselect to which the cursor refers:
      • The outer subselect contains a DISTINCT keyword, GROUP BY clause, HAVING clause, or a column function in the outer subselect.
      • The select contains a join function.
      • The select contains a UNION operator.
      • The select contains a subquery that refers to the same table as the table of the outer-most subselect.
      • The select contains a complex logical file that had to be copied to a temporary file.
      • All of the selected columns are expressions, scalar functions, or constants.
      • All of the columns of a referenced logical file are input only (i5/OS only).