next up previous contents index
Next: ZTELL - recover Up: Global operational aids Previous: ZEND - normal

ZABEND - abnormal program end through ZFATAL

CALL ZFATAL
is defined to be the entry point for fatal run termination.

CALL ZFATAM (chMESSAGE)

is identical to ZFATAL, except that it prints a message, given in the parameter as a character string of not more than 30 characters, terminated by the character '.'.

These routines are supplied by the system; they are protected against recovery loops, and they must not be supplied by the user. They should only be called when the run cannot usefully continue. If the application program discovers such a fatal condition it too should call ZFATAL or ZFATAM, preceded with some diagnostic printing or with loading to some clue to the trouble.

CALL ZABEND

and

CALL ZPOSTM chOPT

This routine receives control from ZFATAL to handle fatal run termination. This routine may be supplied by the user.

The Zebra system contains the standard routine as follows:

       SUBROUTINE ZABEND
 +CDE, ZSTATE.

       CALL ZPOSTM ('TCWM.')
       IF (NQPHAS.LE.0)  CALL ABEND
       NQPHAS = -2
       CALL ZEND
       RETURN
       END

This is not just a dummy, it causes a post-mortem dump, including a subroutine trace-back (if possible), followed by any normal user output programmed in ZEND. Transfer to ZEND takes place only if the break-down happened during normal operation, but not if the program is still in the initialisation phase or if it is already under ZEND control.

The parameter to ZPOSTM is passed from there to DZSNAP to select the options for dumping the dynamic store, see section gif for details.


Janne Saarela
Mon May 15 08:34:47 METDST 1995