DELETE option

Syntax

The standard form of the ENFREQ macro for ACTION=DELETE is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede ENFREQ.
   
ENFREQ  
   
One or more blanks must follow ENFREQ.
   
ACTION=DELETE  
   
,CODE=event code event code: Decimal digit.
   
,DTOKEN=dtoken dtoken: RX-type address or address in register (2) - (12).
   
    ,RELATED=(value) value: Any text.
   

Parameters

The parameters are explained as follows:

ACTION=DELETE
A required parameter that specifies that you want to delete an existing request to listen for a specified event. 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 exits completes. Because the listener user exit might not have completed processing at the time the delete request is issued, do not release the listener user exit's storage.
,CODE=event code
A required parameter that specifies the ENF event for which a program no longer needs notification. The event code can be any of the decimal codes listed in Table 1.
,DTOKEN=dtoken
The required parameter that identifies the specific listen request you are deleting. The system returned the token when you issued the ACTION=LISTEN request.
,RELATED=(value)
An optional parameter that specifies information used to self-document macros by ‘relating’ functions or services to corresponding functions or services. The format and contents of the information specified are at the discretion of the user, and can be any valid coding values.

Return and reason codes

For the return codes, in hexadecimal, from the ENFREQ macro see Return codes.

On systems running z/OS V2R1 or higher, for return code of 0 or 28 (X'1C') from a ACTION=DELETE request, a reason code is provided in access register 15:
0
The ACTION=DELETE request has completed. The listen exit is not executing and will not be called again.
1
The ACTION=DELETE request is pending. The listen exit may be executing or may be called again.
The reason code provides a way to determine when it is safe to free or reuse storage containing the exit or used by the exit. Storage can be safely freed or reused when the first ACTION=DELETE request provides return code 0 and reason code 0, or after the first ACTION=DELETE request provides return code 0 and reason code 1, a subsequent ACTION=DELETE request provides return code 28 (X'1C) and reason code 0.

Because there is no way to determine when it is safe to free or reuse storage containing the exit or used by the exit on systems running z/OS V1R13 or earlier, such storage should never be freed or reused.