Previous Topic: #ENQ SyntaxNext Topic: #ENQ Status Codes


#ENQ Parameters

RSCID=

Names one or more resources to be acquired or tested, specifies the length of each resource, and designates the resource as exclusive or shared.

resource-id-pointer

Specifies the character ID associated with a resource. The resource-id-pointer can be a register that points to a field that contains the ID, he symbolic name of a user-defined field that contains the ID, or the ID literal enclosed in quotation marks. The source-id is a 1 to 256 byte character string used to identify the resource upon which an enqueue is to be set or tested. Any character string may be defined as long as all programs that access the resource use the same name and the name is unique relative to all other names used to identify other resources within the CV.

resource-id-length

Specifies the length of the resource id. Resource-id-length is a register that contains either the length, the symbolic name of a fullword, halfword, or byte-length user-defined field that contains the length, or an absolute expression. You need not specify the length of the ID if resource-id-pointer is provided as a literal enclosed in quotation marks.

E/S

Assigns the exclusive (E) (default) or shared (S) attribute to the named resource.

Note: Multiple RSCID parameters must be in successive order, separated by commas.

PLIST=

Specifies the location of the storage area in which the system will build the #ENQ parameter list.

SYSPLIST

(Default); is the symbolic name of the storage area in which the system will build the #ENQ parameter list.

parameter-value-list-pointer

Either a register that points to the area or the symbolic name of the area in which the system will build the #ENQ parameter list.

The size of the parameter-list area, in fullwords, is equal to:

1 + 3P + ((R + 3)/4)

where:

Thus, if four resource IDs are specified and three are identified using register notation, the length of this storage area is 15 fullwords. In this case the calculated value of 14.5 was rounded up to a whole number. Calculated values are always rounded up to the nearest whole number, regardless of the remainder value.

TYPE=

Specifies whether the issuing task is to test a resource for availability or request acquisition of a resource:

ACQUIRE

(Default); requests that the system acquire the specified resources.

TEST

Requests that the system test the availability of the specified resource.

COND=

Specifies whether this #ENQ request is conditional and under what conditions control should be returned to the issuing program. Only acquire requests can be conditional; this parameter should not be specified when testing the enqueue status of a resource.

NO

(Default); specifies that the request is not conditional.

ALL

Specifies that the request is conditional. Control is returned if the #ENQ cannot be serviced for any of the reasons listed below.

condition

Specifies specific conditions you can test for. Multiple conditions must be enclosed in parentheses and separated by commas.

RSNA

Specifies that control is returned if any of the requested resources is not available in the usage mode requested.

DEAD

Specifies that control is returned if a requested resource cannot be enqueued immediately because of an unavailable condition, and or to wait would cause a deadlock.

RSNAXIT=resource-not-available-label

Specifies the symbolic name of a routine to which control should be returned if the #ENQ request cannot be serviced because at least one of the requested resources is not available.

DEADXIT=deadlock-label

Specifies the symbolic name of a routine to which control should be returned if the #ENQ request cannot be serviced because one of the requested resources cannot be enqueued immediately, and if to wait on its availability would cause a deadlock.

ERROR=error-label

Specifies the symbolic name of the routine to which control should be returned if a condition specified in the COND parameter occurs for which no other exit routine was coded.

FREEXIT=test-is-free-label

(Test requests only); specifies the symbolic name of a routine to which control should be returned if at least one of the resources is free.