z/OS MVS Programming: Sysplex Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The Notify Exit

z/OS MVS Programming: Sysplex Services Guide
SA23-1400-00

A lock owner's notify exit receives control each time a new lock request is queued for the lock. A lock owner's notify exit also receives control when the lock owner has just obtained a lock and there are existing requests queued for that lock. In this case, the new owner's notify exit is immediately given control once for each of the pending lock requests. The intent in both cases is to give the lock owner information about the number of pending lock requests and the identity of each connection requesting the lock.

The notify exit can use the information provided to decide whether to release the lock, ignore the pending request, or take some other application-specific action. The notify exit can compare the current owner's importance to that of the pending request and respond accordingly.

The system supplies the notify exit with the following information each time it receives control:
  • The index of the lock for which there is contention
  • The current state of the lock
  • The connection ID and connection name associated with the lock request causing the contention
  • The lock request (SET or NOTHELD) causing the contention

Information presented to the notify exit is described in more detail under Coding a Notify Exit.

If the notify exit releases the lock, the lock becomes available to satisfy the first eligible lock request, which might not be the lock request that caused the notify exit to be given control. For instance, suppose there are five outstanding lock requests for a lock. The lock owner's notify exit receives control five times. On the fifth time, the notify exit releases the lock. If the lock request at the head of the queue were eligible to be processed, the lock would go to that connection.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014