IBM Support

PM04787: SQLFETCH FAILS WITH SQLCODE -251 IN A NON-EBCDIC ODBC APPLICATION FOLLOWING A CATALOG API CALL WITH SYNONYMS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In a non-EBCDIC ODBC application, i.e. CURRENTAPPENSCH is set to
    UNICODE or ASCII, fetching from a catalog query results in
    SQLCODE -251 if the catalog API was invoked with a table synonym
    as input.
    
    
    ErrorMsg: {DB2 FOR OS/390}{ODBC DRIVER}{DSN09015}  DSNT408I
    SQLCODE = -251, ERROR:  TOKEN  IS NOT VALID
    DSNT418I SQLSTATE   = 42602 SQLSTATE RETURN CODE
    DSNT415I SQLERRP    = DSNHSM2 SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD    = 3  0  0  -1  124  2712 SQL DIAGNOSTIC
    INFORMATION
    DSNT416I SQLERRD    = X'00000003'  X'00000000'  X'00000000'
    X'FFFFFFFF'  X'0000007C'  X'00000A98' SQL DIAGNOSTIC INFORMATION
    ERRLOC=1:13:2
    sqlcode: -251
    sqlstate: 42602
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of DB2 UDB for z/OS Version 8      *
    *                 ODBC/CLI and DB2 UDB for z/OS Version 9      *
    *                 ODBC/CLI.                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: Fetching from a result set that's       *
    *                      generated by an ODBC catalog API        *
    *                      fails with SQLCODE -251 in a non-       *
    *                      EBCDIC ODBC application if a table      *
    *                      synonym is used on the catalog API      *
    *                      call.                                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    In a non-EBCDIC ODBC application, i.e. CURRENTAPPENSCH is set to
    UNICODE or ASCII, fetching from a catalog query results in
    SQLCODE -251 if the catalog API was invoked with a table synonym
    as input.
    
    ErrorMsg:  DB2 FOR OS/390  ODBC DRIVER  DSN09015   DSNT408I
    SQLCODE = -251, ERROR:  TOKEN  IS NOT VALID
    DSNT418I SQLSTATE   = 42602 SQLSTATE RETURN CODE
    DSNT415I SQLERRP    = DSNHSM2 SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD    = 3  0  0  -1  124  2712 SQL DIAGNOSTIC
    INFORMATION
    DSNT416I SQLERRD    = X'00000003'  X'00000000'  X'00000000'
    X'FFFFFFFF'  X'0000007C'  X'00000A98' SQL DIAGNOSTIC INFORMATION
    ERRLOC=1:13:2
    sqlcode: -251
    sqlstate: 42602
    

Problem conclusion

  • Code has been changed to correctly process synonyms on a
    catalog API call in a non-EBCDIC ODBC application.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM04787

  • Reported component name

    DB2 ODBC/JDBC/S

  • Reported component ID

    5740XYR02

  • Reported release

    917

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2010-01-08

  • Closed date

    2010-08-18

  • Last modified date

    2010-09-01

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

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

    UK59792 UK59793

Modules/Macros

  •    CLISYS   DSN@LIMS DSNAOCLI DSNAOC0F DSNAOC13
    DSNAOC14 DSNAOG0F DSNAOG13 DSNAOG14 DSNAOSDK
    

Fix information

  • Fixed component name

    DB2 ODBC/JDBC/S

  • Fixed component ID

    5740XYR02

Applicable component levels

  • R817 PSY UK59792

       UP10/08/28 P F008

  • R917 PSY UK59793

       UP10/08/28 P F008

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

Document Information

Modified date:
04 March 2021