Previous Topic: #ENQ ParametersNext Topic: #ENQ Example


#ENQ Status Codes

By default, an acquire #ENQ is unconditional. Error conditions that can occur are described below:

You can request return of control with the COND parameter while processing an acquire #ENQ to avoid a delay or an abend.

By default, a test #ENQ is unconditional. The return code, contained in register 15, indicates the outcome of the test. Control is returned to the next instruction in the issuing program following the #ENQ. Through the FREEXIT parameter, however, you can request a return of control to a specific label or routine in the event that at least one of the resources tested is free.

After completion of the #ENQ request, the value in register 15 indicates the outcome of the operation.

X'00'

ACQUIRE - All requested resources have been acquired.

TEST - All test resources have already been enqueued by the issuing task with the exclusive/shared option indicated by the test request.

X'04'

ACQUIRE-At least one of the resources indicated is currently owned by another task and is not available for the exclusive/shared option specified; no new resources have been acquired.

TEST- At least one of the tested resources is owned by another task and is not available to this task for the exclusive/shared option specified.

X'08'

ACQUIRE -Not applicable.

TEST - At least one of the tested resources is not already owned by any task and is available for the exclusive/shared option specified.

X'0C'

ACQUIRE - A requested resource could not be enqueued immediately and to wait would cause a deadlock; no new resources have been acquired.

TEST - Not applicable.