IBM Support

PI11756: INCORROUT, EXPECT INSERT 8 ROWS, 0 ROWS INSERTED, DYNAMIC INSERT WITH SELECT

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • INCORROUT, EXPECT INSERT 8 ROWS, 0 ROWS INSERTED,
    DYNAMIC INSERT WITH SELECT.
    (D169934)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 10 and DB2 11 for z/OS users of      *
    *                 IBM DB2 Analytics Accelerator for            *
    *                 offloading INSERT from SELECT statements.    *
    ****************************************************************
    * PROBLEM DESCRIPTION: Less rows than expected were inserted   *
    *                      for IBM DB2 Analytics Accelerator       *
    *                      users of an offloaded INSERT from       *
    *                      SELECT statement.                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When using IBM DB2 Analytics Accelerator to offload
    an INSERT from SELECT statement, less rows than expected
    can be inserted. In the reported case, 8 rows were expected
    to be inserted but 0 rows were inserted.
    
    The problem occurs because DB2 did not clean up some internal
    flags correctly.  As a result, the fetch for a SELECT from the
    'offloaded INSERT from SELECT' did not fetch from the first row.
    
    The following example can help illustrate the failing scenario.
    
    In a given application, include the following INSERT from SELECT
    statement, prepare it, and then execute it.
    
      strcpy(TCGHV1.s,
      "INSERT INTO LINEITEM_LIKE
             SELECT LINEITEM FROM LINEITEM WHERE
                    L_LINENUMBER = ?    AND L_QUANTITY  = ?")
    
      EXEC SQL   PREPARE S1 FROM :TCGHV1   ;
      EXEC SQL   EXECUTE S1 USING :HV_INT11,:HV_CHR21;
      EXEC SQL   EXECUTE S1 USING :HV_INT12,:HV_CHR22;<-SQLCODE=100,
    
    A 'row not found' condition is returned to the application.
    
    The problem can occur for static or dynamic SQL. Other symptoms
    are also possible.
    

Problem conclusion

  • The code in DB2 is modified to correct the problem leading to
    the incorrect result returned from the offloaded statement to
    IBM DB2 Analytics Accelerator.
    
    Additional Keywords: SQLINCORR SQLINCORROUT DB2INCORR/K
                         SQLINSWSELECT IDAAV2R1/K IDAAV3R1/K
                         IDAAV4R1/K INCORROUT
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PI11756

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-02-13

  • Closed date

    2014-04-02

  • Last modified date

    2014-05-02

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UI16685 UI16686

Modules/Macros

  •    DSNXGRTM
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UI16685

       UP14/04/18 P F404

  • RB10 PSY UI16686

       UP14/04/18 P F404

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.



Document information

More support for: DB2 for z/OS

Software version: A10

Reference #: PI11756

Modified date: 02 May 2014


Translate this page: