IBM Support

PI47049: SWITCH CONTEXT CALL FAILED WITH CTX_DISALLOW_SWITCH WHEN FETCHING SECOND STORED PROC RESULT SET WITH LIMITEDBLOCKFETCH=1

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Switch context call failed with CTX_DISALLOW_SWITCH when
    fetching second stored procedure result set with
    LIMITEDBLOCKFETCH=1.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of DB2 Version 11 for z/OS         *
    *                 ODBC/CLI driver                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: SIGABRT with "CLI_ctxSwitchContext 10"  *
    *                      when fetching a stored procedure result *
    *                      set returned by SQLMoreResults() with   *
    *                      LIMITEDBLOCKFETCH=1 and MULTICONTEXT=1. *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    SIGABRT with "CLI_ctxSwitchContext 10" occurs when MULTICONTEXT
    is on and the application is fetching a stored procedure result
    set returned by SQLMoreResults() with LIMITEDBLOCKFETCH=1.
    
    The following example illustrates the problem:
    
    1. Set MULTICONTEXT=1 and LIMITEDBLOCKFETCH=1 in the ODBC
       INI file.
    
    2. Call a stored procedure that returns more than one result
       set.
    
    3. Call SQLBindCol() to bind all result set columns and
       call SQLFetch() repeatedly until all rows in the first
       result set are exhausted.
    
    4. Call SQLMoreResults() to move to the next result set.
    
    5. SIGABRT with "CLI_ctxSwitchContext 10" may occur when
       fetching the first row of the second result set.
    

Problem conclusion

  • Code has been updated to correctly handle processing of
    subsequent result sets when MULTICONTEXT=1.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI47049

  • Reported component name

    DB2 ODBC/JDBC/S

  • Reported component ID

    5740XYR02

  • Reported release

    B17

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-08-18

  • Closed date

    2015-11-20

  • Last modified date

    2016-01-04

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

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

    UI33174

Modules/Macros

  •    DSNAOCLI DSNAOC0E DSNAOG0E DSNAOSDK
    

Fix information

  • Fixed component name

    DB2 ODBC/JDBC/S

  • Fixed component ID

    5740XYR02

Applicable component levels

  • RB17 PSY UI33174

       UP15/12/08 P F512

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.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B17"}]

Document Information

Modified date:
04 March 2021