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


Abnormal termination exit (non-CICS)

Figure 1. Non-CICS abnormal termination exit sample
**********************************************************************
*                                                                    *
*  Do a system DUMP whenever an unhandled condition occurs.          *
*                                                                    *
**********************************************************************
SAMPDAT1 CEEENTRY PPA=ASMPPA,MAIN=NO
         L     2,0(,1)                    Put the pointer to the CIB
*                                         address in R2.
         L     2,0(,2)                    Put the CIB address in R2.
***********************************************************************
* Set up the ESTAE and force the abend with a dump.
***********************************************************************
         ESTAE ESHDLR
         ABEND 4039,REASON=0,DUMP         FORCE DUMP
RETRY    ESTAE 0
         CEETERM                          All done, return to Language Environment
         DROP  11,13
         USING *,15
ESHDLR   STM   14,12,12(13)
NEXT     L     11,MODENT
         USING SAMPDAT1,11
         DROP  15
         SETRP RC=4,RETADDR=RETRY,RETREGS=YES,FRESDWA=YES
         LM    14,12,12(13)
         BR    14
MODENT   DC    A(SAMPDAT1)
ASMPPA   CEEPPA
         CEEDSA
         CEECAA
SDWA     IHASDWA
         END SAMPDAT1

Terms of use | Feedback

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