Event code 21 — process termination event

Purpose

Event code 21 performs language-specific process termination. This event is used to terminate HLL portions at the process level. The order in which the member event handlers are called is undefined. In particular, the dependency list is not honored. Upon entry into the member event handler, the following is available:
  • R13 points to a DSA into which the event handler is able to store its caller's registers.
  • R12 is pointing to a simulated CAA allowing stack frame acquisition.
  • A fixed size stack is available for use by the HLLs when called for process initialization. The stack size is 1024 bytes. There is no stack overflow support.
  • The simulated CAA has a pointer to the PCB. The simulated CAA has a zero pointer to the EDB.
  • The addresses of LOAD and DELETE services and GETMAIN/FREEMAIN services are held in the PCB. It is the caller's responsibility to relinquish resources obtained at the process level.
  • The format of the member list at the process level is of the same format as the member list at the enclave level.
  • The CEERCB_REUSE_STATE field, which indicates the state of library reuse and had one of the following values:
    0
    Reuse is not in effect
    1 or 2
    Reuse is in effect.
    3
    The reuse environment is terminating.

The PLIST is an OS-style PLIST containing the single parameter of the event code for process termination.

At termination, all resources obtained at the process level MUST be released explicitly. Language Environment does not implicitly release any resource obtained at the process level. (Do not depend upon the resource persisting, even if the resource was not explicitly released.)

During preinitialization, this event indicates that the HLL should relinquish all resources maintained at the process level. Note all HLL semantics for a terminating application has already been accomplished by event 20 enclave termination event. This event is driven for a preinitialization TERM request for a main application.

The counterpart for this event is Event code 17 — process initialization event.

Syntax

Call CEEEVnnn (21, reuse_participant)
INT      *reuse_participant;
reuse_participant
Indicates if the member participates in library reuse; a value of 1 indicates participation.

Usage notes

  • This event is called in both CICS® and non-CICS environments.
  • This event is called only if process initialization was called.
  • In CICS, this event is called during transaction termination. Member languages should terminate for the transaction during this call.
  • CICS SPF: Language Environment calls languages in key 8 for this event. Storage for parameters can be in key 8.
  • Members must set the reuse_participant parameter to 1 if they participate in library reuse and need to be called for final process termination when the reuse environment terminates.