A fix is available
APAR status
Closed as new function.
Error description
Since COBOL programs can come and go in an IMS environment, but the JVM persists, when a COBOL program starts up, and has Java-shareable items, it needs to signal to the Java side that it has come alive and that any W-S accessor objects that it had anchored in static memory will need to be refreshed next time they are accessed.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL 6.4 compiling and * * running programs that use non-OO COBOL/Java * * interoperability features and satisfy one or * * more of the following conditions: * * * * (1) A COBOL program with the JAVA-SHAREABLE * * directive is run multiple times in an IMS * * environment in different run units. * * * * (2) COBOL programs in the interoperable * * application require more flexibility in * * dealing with Java exceptions instead of * * terminating the current COBOL run unit * * whenever a Java exception is detected. * **************************************************************** * PROBLEM DESCRIPTION: (1) Incorrect runtime results and * * possible runtime abend (0C4). * * * * Java programs reading from COBOL * * WORKING-STORAGE memory can retrieve * * incorrect values and experience runtime * * 0C4 abends. Java programs writing to * * COBOL WORKING-STORAGE memory can * * silently fail to update the memory * * successfully and can also experience an * * 0C4 runtime abend. * * * * (2) The COBOL run unit terminates when * * a Java exception is detected in a COBOL * * stub program, causing the interoperable * * application to terminate without giving * * the associated user COBOL program a * * chance to catch and handle the * * exception and keep the application * * running. * **************************************************************** * RECOMMENDATION: Apply the IBM-provided PTF. * **************************************************************** (1) When a COBOL program with the JAVA-SHAREABLE directive was run multiple times in an IMS environment in different run units, the Java part of the interoperable application would have a stale connection to the program's WORKING-STORAGE memory, which means that reads/writes to that memory could result in accessing memory that is no longer available. (2) The current behavior of a COBOL stub program when it detects that a Java exception occurred was to terminate the run unit without giving the associated user COBOL program a chance to intervene and handle the exception.
Problem conclusion
(1) The compiler was updated to ensure that when a COBOL program with the JAVA-SHAREABLE directive runs for the first time in a run unit in any environment (batch, IMS, or otherwise), it invalidates any existing connections in the JVM to its WORKING-STORAGE memory so that subsequent accesses to the memory from Java know to refresh the connection before reading/writing to that memory. (2) The compiler was updated to provide support for an ON EXCEPTION phrase of the CALL statement for calls from COBOL to Java methods, giving the user program a chance to catch and handle Java exceptions for calls to Java methods. When the ON EXCEPTION phrase is not provided, an unhandled exception will still result in the termination of the COBOL run unit. A new special register, IGY-JAVAIOP-CALL-EXCEPTION, is also provided, to allow user code in the ON EXCEPTION phrase of the CALL statement to access the Java exception object associated with the exception. Note: If you are running Enterprise COBOL 6.4 programs that use the CALL statement to make static calls to Java methods and want to use the new ON EXCEPTION phrase of the CALL statement to intercept and handle COBOL/Java parm/arg array length mismatch errors, then this PTF pre-reqs the PTF(s) for COBOL Runtime LE APAR PH53634 (AMODE 31) and APAR PH53635 (AMODE 64). For more information, please refer to the following sections in the Enterprise COBOL for z/OS 6.4 IBM Documentation online: (1) Enterprise COBOL for z/OS 6.4 -> Language Reference -> COBOL language structure -> Character-strings: COBOL words and literals -> Special registers -> IGY-JAVAIOP-CALL-EXCEPTION (2) Enterprise COBOL for z/OS 6.4 -> Language Reference -> PROCEDURE DIVISION -> PROCEDURE DIVISION statements -> CALL statement (3) Enterprise COBOL for z/OS 6.4 -> Programing Guide -> COBOL/Java interoperability outside of the object-oriented (OO) COBOL framework -> Handling errors in Java-interoperable COBOL applications
Temporary fix
Comments
APAR Information
APAR number
PH53631
Reported component name
ENT COBOL FOR Z
Reported component ID
5655EC600
Reported release
640
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
YesSpecatt / New Function / Xsystem
Submitted date
2023-03-30
Closed date
2023-04-18
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:
UI91480 UI91481 UI91482 UI91483
Modules/Macros
IGY8CICS IGY8RWRD IGY8RWTU IGYCASMB IGYCCBE IGYCCCRT IGYCCICS IGYCCSRV IGYCDGEN IGYCDIAG IGYCDMAP IGYCEN$0 IGYCEN$1 IGYCEN$2 IGYCEN$3 IGYCEN$4 IGYCEN$5 IGYCEN$8 IGYCEN$D IGYCEN$R IGYCFGEN IGYCFREE IGYCINIT IGYCJA$0 IGYCJA$1 IGYCJA$2 IGYCJA$3 IGYCJA$4 IGYCJA$5 IGYCJA$8 IGYCJA$D IGYCJA$R IGYCJBLD IGYCJDM6 IGYCJDMR IGYCJGEN IGYCLIBR IGYCLSTR IGYCLVL0 IGYCLVL1 IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL IGYCOSCN IGYCPGEN IGYCRCTL IGYCRDPR IGYCRDSC IGYCREAL IGYCRWT IGYCSCAN IGYCSIMD IGYCUE$0 IGYCUE$1 IGYCUE$2 IGYCUE$3 IGYCUE$4 IGYCUE$5 IGYCUE$8 IGYCUE$D IGYCUE$R IGYCXREF IGYDRV IGYEQCWI IGYMSGE IGYMSGK IGYMSGT IGYQCBE IGYQSPLT IGYZQEN6 IGYZQENU IGYZQJP6 IGYZQJPN
Fix information
Fixed component name
ENT COBOL FOR Z
Fixed component ID
5655EC600
Applicable component levels
R640 PSY UI91480
UP23/04/26 P F304
R641 PSY UI91481
UP23/04/26 P F304
R642 PSY UI91482
UP23/04/26 P F304
R64H PSY UI91483
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":"640","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
12 December 2023