Non-SRBEXIT routine

The following information is about standard listener user exit routines. For information about SRB listener user exit routines, see SRBEXIT routine.

Exit Routine Environment: The listener user exit receives control in the following environment:

Environmental factor Requirement
Authorization: Supervisor state and PSW key 0
Dispatchable Unit Mode: Task or SRB
Cross memory mode: PASN=HASN=SASN
AMODE: Depends on the setting of the high-order bit of the field containing the exit routine address. (24-bit if the bit is off, 31-bit if the bit is on)
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held

Exit recovery: If your listener user exit routine acquires resources, such as storage or locks, provide a recovery routine for the exit.

If the listener user exit routine ends abnormally, control proceeds to the exit's recovery routine, if it provides one, or to a system recovery routine. The system recovery routine ends the notification request so that the exit routine that abended can no longer receive control. ENF continues, however, to send notification to the other listening programs.

The system will not end the notification request for an exit routine if a non-retryable abend, such as a CANCEL command, caused the listener user exit routine to end abnormally.

Listener user exit processing: The high-order bit of the listener user exit address specified on the ENFREQ macro request determines the AMODE in which the listener user exit routine receives control.

Programming considerations: The listener user exit routine must be reentrant.

Instructions and restrictions: Avoid such time-consuming processing as obtaining large amounts of storage through the GETMAIN macro, issuing WAITs or calling routines that issue the WAIT macro, and performing I/O operations. Also, avoid requests for the local lock and using multiple listener user exits. Avoid the use of dynamic allocation (SVC99) calls in "listen" exits that receive control in ASID 1; such calls can cause unpredictable results.

Because the listener user exit routine does not normally receive control in the same address space as the LISTEN request, the listener user exit routine cannot depend on the original address space always existing.

Entry specifications: The system passes information to the listener user exit routine in a parameter list that is mapped by the event code's mapping macro. For information about the parameter lists for each event code, see ENF event codes and meanings.

Registers at entry: On entry to the listener user exit routine, the registers contain the following information:

Register Contents
GPR 0 Event code
GPR 1 Address of a 6-word structure.
Word
Contains
1
Address of the parameter list supplied by the system for this event code
2
Fullword of zeros
3
Fullword of data specified on the PARM keyword or the address of the listener parameter list specified on the PARM keyword
4
Fullword of zeros
5
Address of a parameter list mapped by the IEFENFSG macro
6
Fullword of zeros
See Passing parameters to a listener user exit routine.
GPRs 2-12 Do not contain any information for use by the listener user exit.
GPR 13 Address of an 18-word save area
GPR 14 Return address
GPR 15 Entry point address of the listener user exit routine

Return specifications: The listener user exit routine does not need to set any return codes.

Registers at exit: Upon return from listener user exit routine processing, the registers must be:

Register Contents
0, 1 The listener user exit does not have to place any information in this register, and does not have to restore its contents to what they were when the listener user exit routine received control.
2 - 13 The listener user exit must restore the contents to what they were when the exit received control.
14, 15 The listener user exit does not have to place any information in this register, and does not have to restore its contents to what they were when the listener user exit routine received control.