Use the RELEASE request to release a serially reusable resource that you obtained by using ISGENQ macro. If a task tries to release a resource which it does not control, the control program either returns a non-zero return code or abends the task. The control program might place many tasks in a wait condition while it assigns control of the resource to one task. Having many tasks in the wait state might reduce the amount of work being done by the system, therefore, you should release the resource, so that another task can use it.
Note that authorized routines that may get control under a resource manager must prevent themselves from getting deadlocked. They may need to conditionally request an ENQ or query if it is already outstanding by the address space that is in memory termination. They cannot obtain nor release an ENQ that was obtained by the terminating space. However, they are guaranteed that no processing can take place in the space that is terminating. As such, they can use the outstanding serialization to perform any required back out or completion processing.