Description

The ENFREQ macro enables an authorized program to: To listen for an event, a program issues ENFREQ with the ACTION=LISTEN parameter. When the event that the program is listening for occurs, control passes to the listener user exit routine specified on the EXIT or SRBEXIT parameter. For a list of the events for which a program can listen, see Table 1.

To stop listening for an event, a program issues ENFREQ with the ACTION=DELETE parameter to delete the listen request. When a program issues ENFREQ with the ACTION=DELETE parameter, ENF either deletes the listen request immediately if the listener user exit has completed, or waits until the listener user exit completes. Because the listener user exit might not have completed processing at the time the delete request is issued, you must not release the listener user exit's storage or any resources that may be required by the exit. ENF does not delete the user exit when it deletes a listen request. See DELETE option for the syntax of a delete request.

For guidance information about how to use the ENFREQ macro and code the listener user exit routine, see z/OS MVS Programming: Authorized Assembler Services Guide.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state and any PSW key
Dispatchable unit mode: Task or SRB
Cross memory mode: PASN=HASN=SASN
AMODE: 24- or 31-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in the primary address space

Programming requirements

The caller of ENFREQ must do the following:
  • Include the CVT, IEFENFCT, and IEFENFPM mapping macros. Specify the DSECT=YES option with the CVT mapping macro.
  • Declare a fullword and label it ENFPTR.

Restrictions

None.

Input register information

Before issuing the ENFREQ macro, the caller must ensure that the following GPRs contain the specified information:
Register
Contents
13
Address of a standard 18-word save area.

Output register information

When control returns to the caller of the ENFREQ macro, the general purpose registers (GPRs) contain:
Register
Contents
0
Unchanged
1
Used as a work register by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller of the ENFREQ macro, the access registers (ARs) contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14
Used as a work register by the system
15
Reason code

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.