IBM Support

PH53635: JAVAINTEROP: THROW JAVA EXCEPTION FOR LENGTH MISMATCH BETWEEN JAVA ARRAY AND COBOL DATA ITEM FOR AMODE64

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • Throw a Java exception (instead of stopping the run unit as
    currently occurs) when there is a length mismatch between the
    Java array and the corresponding COBOL data item for AMODE64.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.4 running AMODE  *
    *                 64 programs that use non-OO COBOL/Java       *
    *                 interoperability support and there is an     *
    *                 array length mismatch between a Java array   *
    *                 argument or return value and the             *
    *                 corresponding COBOL parameter or receiver.   *
    ****************************************************************
    * PROBLEM DESCRIPTION: Failure to catch the error at runtime,  *
    *                      leading to unpredictable runtime        *
    *                      results.                                *
    ****************************************************************
    * RECOMMENDATION: Apply the IBM-provided PTF.                  *
    ****************************************************************
    Array length mismatches between COBOL and Java arguments or
    return values was being handled through error codes passed
    between the COBOL program and the COBOL runtime, but that scheme
    was not sufficient in some scenarios, including a scenario where
    the new ON EXCEPTION phrase of a CALL statement for a call to a
    static Java method is used.
    

Problem conclusion

  • The runtime was updated so that when a mismatch between the
    length of a Java array argument or return value and the
    corresponding COBOL table parameter or receiver occurs, an
    exception of class java.lang.IllegalArgumentException is thrown,
    which can be caught and handled in COBOL via the ON EXCEPTION
    phrase of a CALL statement for a CALL to a static Java method,
    or can be handled in Java code using try/catch.
    
    Note that a program must be compiled with an Enterprise COBOL
    6.4 compiler with the PTF(s) for APAR PH53631 installed in order
    to use the ON EXCEPTION phrase of a CALL statement targeting a
    Java method in order to catch and process Java exceptions.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH53635

  • Reported component name

    LE ENT COBOL LI

  • Reported component ID

    568819812

  • Reported release

    7D0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / New Function / Xsystem

  • Submitted date

    2023-03-30

  • Closed date

    2023-04-12

  • Last modified date

    2023-05-03

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

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

    UI91395 UI91399

Modules/Macros

  • CELQSG04 CELQV004 IGZQAPI  IGZQCA64 IGZQCDA  IGZQINPL IGZQJNI2
    

Fix information

  • Fixed component name

    LE ENT COBOL LI

  • Fixed component ID

    568819812

Applicable component levels

  • R7C0 PSY UI91395

       UP23/04/26 P F304  

  • R7D0 PSY UI91399

       UP23/04/26 P F304  

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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7D0","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
03 May 2023