The timing of abends between Language Environment and VS COBOL II is different for runtime detected errors (such as IGZ0061S division by zero or IGZ0006S subscript out of range). This difference in the timing of abends affects the behavior of CICS HANDLE ABEND.
Under Language Environment, the following events occur when there is a runtime detected error (with ABTERMENC(ABEND) in effect):
With VS COBOL II, the following events occur when there is a runtime detected error:
Under Language Environment, when a runtime detected error occurs, the enclave (run unit) that contains the code is terminated before the abend is issued. Thus, code at a label referenced in the CICS HANDLE ABEND command does not get control.
Under VS COBOL II, an abend is issued while the run unit still exists, so code at the HANDLE ABEND label is executed.
For behavior compatible with VS COBOL II, use the sample user condition handler code, CEEWUCHA, that is provided with Language Environment in the SCEESAMP data set.
When you use CEEWUCHA under Language Environment, the following events occur when there is a runtime detected error (with ABTERMENC(ABEND) in effect):