Listening for system events

The event notification facility (ENF) allows an authorized program to listen for the occurrence of a specific system event. For example, a program could use ENF to listen for a software record being written to the logrec data set. When the system writes the record to the logrec data set, control passes to a specified listener user exit routine. For a list of the system events that an authorized program can listen for, see ENF event codes and meanings.

To listen for a system event, use the ENFREQ macro with the LISTEN option to specify:

In addition to issuing ENFREQ, you must also install your listener user exit routine in common storage if the listener user exit routine is not an SRB exit.

To stop listening for a system event, use ENFREQ with the DELETE option to specify:

The information describe how to establish a listen request and code a listener user exit routine. For the complete syntax of the ENFREQ macro, see z/OS MVS Programming: Authorized Assembler Services Reference EDT-IXG.