IBM Support

PM69067: ABEND0C4 WHEN USING JAVA STORED PROCEDURE BOUND PRIOR TO DB2 V8

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Various types of 0C4 abends may occur or other incorrect results
    when using a Java Stored Procedure bound prior to DB2 V8.
    
    One specific example was an 0C4-38 abend at DSNB1REL+02B2 caused
    by two bytes of zeros being placed in the low order two bytes of
    an address field.  Later code, that used that address field,
    failed with the 0C4.
    

Local fix

  • Re-BIND any packages that contains Java Stored Procedures bound
    prior to DB2 V8.  Here is a sample SQL Catalog Query, that can
    help to identify the packages needing to be rebound.
    
     SELECT
      SUBSTR(R.SCHEMA,1,8) AS "SCHEMA",
      SUBSTR(R.OWNER,1,8)  AS "OWNER",
      SUBSTR(R.NAME,1,24)  AS "NAME",
             R.CREATEDTS, R.ALTEREDTS,
      SUBSTR(R.LANGUAGE,1,10) AS "LANGUAGE",
             R.ROUTINETYPE AS "TYPE",
      SUBSTR(P.COLLID,1,10) AS "PCOLLID",
      SUBSTR(P.NAME,1,10)  AS "PNAME",
             P.RELBOUND, P.BINDTIME
      FROM   SYSIBM.SYSPACKDEP  D, SYSIBM.SYSPACKAGE P,
             SYSIBM.SYSROUTINES R
       WHERE  D.DCONTOKEN = P.CONTOKEN
        AND   D.BTYPE = 'O'
        AND   (P.RELBOUND = 'K' OR P.RELBOUND = ''
               OR P.RELBOUND = '')
        AND   R.SPECIFICNAME = D.BNAME
        AND   R.ROUTINETYPE = 'P'
        AND   R.LANGUAGE = 'JAVA'
       ORDER BY P.NAME;
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 10 for z/OS users of stored          *
    *                 procedures written in JAVA with a package    *
    *                 bound prior to DB2 for z/OS V8.              *
    ****************************************************************
    * PROBLEM DESCRIPTION: ABEND0C4 RC00000038 at DSNIDM DSNB1REL  *
    *                      offset 02B2 may occur when a JAVA       *
    *                      stored procedure is executed on V10     *
    *                      and its package was bound on a          *
    *                      release prior to DB2 for z/OS V8.       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    ABEND0C4 RC00000038 at DSNIDM DSNB1REL offset 02B2 may occur
    for a JAVA stored procedure application bound prior to DB2 for
    z/OS V8 and executed on a DB2 10 for z/OS system.
    
    The following example illustrates the problem.
    
    1. Create a JAVA stored procedure on a DB2 release such as
    Version 7.
       CREATE PROCEDURE SPTEST(IN SPSCHEMA VARCHAR(31),
                               OUT STATUS VARCHAR(50))
        EXTERNAL NAME 'JDBCHPJ.SPTEST:JDBCHPJ.SPTEST.
                       sptest(STRING,STRING)'
        LANGUAGE JAVA
        PARAMETER STYLE JAVA
        NOT DETERMINISTIC
        COLLID NULLID
        WLM ENVIRONMENT WLMENVJ
    
    Please note, in the above JAVA stored procedure definition, JAR
    SCHEMA value is JDBCHPJ, JAR ID value is SPTEST, and JAVA
    SIGNATURE value is (STRING, STRING).
    
    2. Create a calling application and bind it on the DB2 V7 system
    
       EXEC CALL SPTEST(:HV1, :HV2);
    
    3. Migrate the system to DB2 10 for z/OS and run the calling
       application
    
    DB2 code does not correctly puff an internal structure to the
    corresponding V10 structure for JAR SCHEMA, JAR ID and
    JAVA SIGNATURE.  This may result in a memory overlay or the
    ABEND0C4 described above.
    
    Please note, depending on the overlay location other symptoms
    are possible.
    

Problem conclusion

  • DB2 code has been fixed to puff the internal structure correctly
    when a JAVA stored procedure is invoked.
    
    Additional Keywords: SQLSP SQLSTOREDPROC SQLMIGRATION OFFSET02B2
    

Temporary fix

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

Comments

APAR Information

  • APAR number

    PM69067

  • 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

    2012-07-17

  • Closed date

    2012-08-24

  • Last modified date

    2012-10-01

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

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

    UK81304

Modules/Macros

  • DSNXRPUF
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK81304

       UP12/09/08 P F209

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.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
01 October 2012