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


Error handling routines in existing programs

For OS/VS COBOL and VS COBOL II applications, total source conversion is not necessary. You need to convert only programs that either establish or perform condition handling.

However, if the application code is maintained in OS/VS COBOL or VS COBOL II, automatic stack frame collapse will not take place. If the application resumes after the condition handler gets control, you must explicitly cancel any programs that will be reentered before they are reentered.

To convert programs that establish or perform condition handling:

  1. Replace the CALL to the ESTAE routine with a CALL to CEEHDLR (a Language Environment callable service). Only Enterprise COBOL programs can use CEEHDLR.

    If you want to resume and have more control of where to resume, use the SET RESUME POINT service (CEESRP). For details, see the Language Environment Programming Reference.

  2. Make your ESTAE exit into a separate Language Environment-conforming routine (Enterprise COBOL, Language Environment-conforming assembler, or Language Environment-conforming C).
  3. Change the logic of your condition handler. You must use Language Environment services to indicate whether you want to RESUME, PERCOLATE (let another handler take control), or PROMOTE (change the condition to another condition). You can also use Language Environment services to find the name of the program that incurred the condition, or retrieve the error message associated with the condition.

Terms of use | Feedback

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