Using object oriented COBOL or interoperating with C programs

Some programming languages, such as Java™ and C, expect division-by-zero operations to result in infinity. Others, such as PL/I and COBOL, expect division-by-zero operations to cause an exception. COBOL programs set the processor to run in a mode whereby division-by-zero operations cause an exception. If a COBOL program is object oriented and invokes a Java method or if a COBOL program interoperates with a C program, and if the Java or C program executes a division-by-zero operation, the program could terminate.

To avoid program termination, you can follow the instructions in the IGZXDIVZ sample to compile and link the condition handler into the SCEERUN data set and use the Language Environment® runtime option USRHDLR(IGZXDIVZ) with the affected application.