Coding the listener user exit routine

After the event for which you are listening occurs, control passes to the listener user exit routine you specify on either the EXIT parameter or the SRBEXIT parameter of the ENFREQ macro. The exit receives control in the event issuer's address space. If you want the listener user exit routine to receive control in SRB mode in the address space that issued the listen request, specify SRBEXIT. For example, if the listener user exit routine needs to address the requestor's private storage, use SRBEXIT. SRBEXIT is valid only with certain event codes. See ENF event codes and meanings for a list of all codes and their meanings.

If, for documentation purposes, you want to specify names for the listener user exit routine and the exit's establisher, use the EXITNME and ESTBNME parameters on ENFREQ. Although these parameters are optional, IBM® recommends that you use them.

The listen exit is coded to run in either task or SRB mode, depending on the parameter you specify. If you specify SRBEXIT, it can only run in SRB mode. If you specify EXIT, it is able to run in both task and SRB modes. The Listen exit does not impose any restriction on the signaller.

Installing the Exit: The listener user exit routine must reside in common storage if the exit routine is not an SRB exit. To install the listener exit routine in common storage, perform the following steps:

If the exit routine is an SRB exit, it can reside in either common or private storage.