IBM Support

PQ36209: SQLSTATE S1C00 WHEN PROCESSING A QUERY RESULT SET CREATED BY A STORED PROCEDURE CALL

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DB2 ODBC CLI
    SQLSTATE S1C00 occurred when processing query result set.
    
    Note: For DB2 Version 5, the equivalent APAR is PQ36208.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of DB2 for OS/390 Version 6 Open   *
    *                 Database Connectivity (ODBC/CLI).            *
    ****************************************************************
    * PROBLEM DESCRIPTION: Symptoms reported:                      *
    *                      - SQLGetData SQL_ERROR, SQLSTATE S1C00  *
    *                      - SQLTransact SQL_ERROR, SQLSTATE 57015 *
    *                      - CEE3DMP title CLI_ctxSwitchContext 10 *
    *                      - CLI_memFree+11E calls abort (SIGABRT) *
    *                      - SQLConnect+36A abend 0C4 (SIGSEGV)    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Problems Addressed By This APAR
    -------------------------------
    
    (1) Exception thrown when using JDBC Type 1 Driver, which uses
    the ODBC driver, to process a query result set that was created
    by SQL CALL to a stored procedure.  The exception message is:
    
         java.sql.SQLException:
               {DB2 for OS/390}{ODBC Driver}  SQLSTATE=S1C00
    
    If this error occurs in an ODBC application, or the ODBC
    application trace is examined, the symptom is SQLGetData()
    returning SQL_ERROR due to SQLSTATE S1C00.
    
    The symptom can be intermittent.  The cause of the symptom is an
    uninitialized field in an ODBC control block that is built when
    processing result sets from stored procedures.
    
    (2) When using the JDBC Type 1 Driver, which uses the ODBC
    driver, SQLTransact() returns SQL_ERROR when issued by the Java
    Virtual Machine (JVM) finalizer thread.  ODBC diagnostic trace
    shows SQLTransact receives SQLSTATE 57015, SQLCODE -981 with
    SQLERRP = DSNARA00 and SQLERRMT = character string '00C12216'.
    
    This problem occurs when JDBC connection objects are being
    closed under the JVM finalizer thread as quickly as the
    connection objects are being left unreferenced by the
    application.
    
    (3) Language Environment (LE) dump CEEDUMP is produced with
    title:
          CEE3DMP Vx Ry.z: CLI_ctxSwitchContext 10
    This can occur when using the JDBC Type 1 driver (uses ODBC)
    to process query result sets that were created by SQL CALL to
    a stored procedure.
    
    This problem occurs only when a multithreading application is
    processing query result sets.  Connection.commit() or
    SQLTransact() is issued from one thread TCB, then another thread
    TCB attempts to use the same connection, resulting in the
    CEEDUMP.  The result set cleanup code in ODBC is not performing
    the proper switching during commit processing that will allow
    the connection to be used successfully by another TCB.
    
    (4) CLI_memFree+0000011E calls abort() due to one-byte overlay
    detected. Storage block trailer is x'00030303' due to overlay by
    an input parameter string that represents a Time value.
    
    In the JDBC Type 1 Driver (uses ODBC) this setObject call
    sequence will cause the overlay:
    
      String time_str = "00:00:00";
      PreparedStatement.setObject(1, time_str, java.sql.Types.TIME);
    
    In an ODBC application this call will cause the overlay:
    
      SQLBindParameter with fCType=SQL_C_CHAR and fSQLType=SQL_TIME
    
    where parameter rgbValue == string "00:00:00" when SQLExecute
    is issued.
    
    The time value is not important in this problem.  The value
    "00:00:00" is shown only as an example.
    
    In both the JDBC and CLI case, the overlay is detected later
    when memory is being freed by CLI driver code.
    
    (5) ABEND0C4 in SQLConnect+0000036A with ODBC Initialization
    (INI) file settings MULTICONTEXT=1, AUTOCOMMIT=1,
    MVSATTACHTYPE=RRSAF, and CURRENTSQLID=sql_id specified in INI
    file.
    

Problem conclusion

  • ODBC code has been changed to correct the reported problems.
    
    ================================================================
    == Action Information for PQ36209                             ==
    ================================================================
    
    The following action information also appears as ++HOLD(ACT) in
    the PTF for PQ36209:
    
    ***Action for PQ36209:
    
    Database Request Module (DBRM) DSNCLIQR is updated by this PTF.
    Application of this PTF requires a BIND PACKAGE for DSNCLIQR.
    If the BIND is not performed after applying this PTF, an SQLCODE
    -805 can result when running ODBC applications.
    
    To bind the DSNCLIQR package, refer to the sample DB2 ODBC
    bind job DSNTIJCL in the SDSNSAMP dataset for an example of how
    to perform the BIND command.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PQ36209

  • Reported component name

    DB2 ODBC/JDBC/S

  • Reported component ID

    5740XYR02

  • Reported release

    617

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2000-03-04

  • Closed date

    2000-03-31

  • Last modified date

    2000-05-02

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

    PQ36208

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

    UQ42069

Modules/Macros

  •    CLICONN  CLICVT   DSN@LIQR DSNAOCLI DSNAOSDK
    

Fix information

  • Fixed component name

    DB2 ODBC/JDBC/S

  • Fixed component ID

    5740XYR02

Applicable component levels

  • R617 PSY UQ42069

       UP00/04/17 P F004

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":"617"}]

Document Information

Modified date:
03 March 2021