Writing POST exit routines

The POST exit function provides authorized routines with a service that allows them to receive control immediately upon each completion of an outstanding event (other POST functions can be used by unauthorized routines). Thus, the user can write a routine that receives control between the time the ECB is marked completed and the return by POST to the caller.

This function defines a special type of ECB known as an extended ECB. When initialized, these extended ECBs identify potential work requests rather than waiting tasks. A purpose of an extended ECB is to notify a process (for example, a subsystem) of an additional work request. Thus when an extended ECB is posted, a subroutine of the process receives control and updates a queue to identify the current work request.

When using the POST exit function, your routine must follow this sequence:
  • Identify POST exit routines.
  • Initialize extended ECBs and ECB extensions.
  • Wait for work requests.
  • Delete POST exit routines before terminating.