Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


Advantages of user-written condition handling routines

Managing the point where you resume execution after handling an error is much simpler with Language Environment than with OS/VS COBOL or VS COBOL II. With OS/VS COBOL, VS COBOL II, and Language Environment, recursive calls are not allowed. For example, under OS/VS COBOL and VS COBOL II, if Program A calls Program B and an error occurs in Program B thus passing control back to Program A, Program A then cannot call Program B because this would cause a recursive error. Thus, after intercepting an error, the condition handler must resume at the next sequential instruction (NSI) following the instruction that incurred the error.

With OS/VS COBOL and VS COBOL II, to resume in a program other than the one that incurred the error, you are required to cancel the programs that are active at the time of the error and that might be reentered after the ESTAE exit received control.

When running Enterprise COBOL or Language Environment-conforming assembler programs under Language Environment, Language Environment automatically deactivates your programs when you change the resume point. Applying the above example to programs that run under Language Environment, after resuming in Program A, you can call Program B. Language Environment has deactivated Program B, so no recursion occurs.

For VS COBOL II programs, the move resume cursor function (Language Environment callable service CEEMRCR) will cause stack frame collapse, where programs that were active are rendered inactive, and can then be reentered (except for VS COBOL II programs compiled with NOCMPR2 that use nested programs).

For VS COBOL II programs that can be reentered, you can:

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)