Duplicate requests for a resource

A duplicate request occurs when a task issues an ISGENQ macro to request a resource that the task already controls. With the second request, the system recognizes the contradiction and returns control to the task with a non-zero return code (for a conditional request) or abnormally ends the task (for an unconditional request). You should design your program to ensure that a second request for a resource made by the same task is not issued as an unconditional request until control of the resource is released for the first use. Be especially careful when using an ENQ macro in an exit routine.

Two specific reasons why the use of ISGENQ in an exit routine must be carefully planned are:

For more information on this topic, see ENQ and DEQ conditional and unconditional requests.