VENQ
See Propagating-enqueues-to-other-MVS-systems for information about how to ensure that SYSTEMS enqueues with the major name BBIUSER are propagated to all members of the Global Resource Serialization (GRS) complex.
Use this command
- When accessing a particular resource that needs to be serialized
- In conjunction with the VDEQ command
Command | Parameters |
---|---|
VENQ | 'symbolicName' disposition requestType [SCOPE(STEP|LOCAL|GLOBAL)] |
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
'symbolicName' | Minor name of the enqueue | Parameter is 1-255 alphanumeric characters. |
disposition | Type of enqueue to issue | Valid values are either SHR or EXC. Specifying SHR means that this task allows other tasks to concurrently use this resource. Specifying EXC means that this task cannot have any other task concurrently using this resource. If this task has control of the resource, all other tasks must wait until this task releases control of the resource. If another task already has control of this resource, this task waits until it can obtain exclusive control of the resource. EXC is the default. |
requestType | Request type for the enqueue specified | Valid values are as follows:
|
NOWAIT tests to determine if the enqueue can be obtained, and if so, it obtains the enqueue. | The NOWAIT parameter attempts to obtain the enqueue for a resource and if the resource is being used by another task, immediately returns the reason in a return code. If an enqueue conflict exists, the return codes returned are IMFCC=8 and IMFRC=4 and the enqueue is not obtained. A task can only enqueue a resource once. Subsequent enqueues to the same task fails with IMFCC=4 and IMFRC=8 return codes and leave the original enqueue intact. | |
TEST tests to see if the enqueue can be obtained and returns that information to the caller without obtaining the ENQ. | Different condition codes are returned if this parameter is used. See Condition-codes-for-IMFEXEC-VENQ. When you specify the TEST parameter, the EXEC attempts to find out the availability of a resource based on the setting that you specify with the SCOPE parameter. For example, specifying TEST with
| |
no parameter specified or left blank | If you do not specify NOWAIT or TEST, the command attempts an enqueue. If the resource is not currently available, the command waits for the resource to become available. | |
SCOPE | Determines where the enqueue is issued | Valid values are as follows:
When you specify VENQ SCOPE(LOCAL) or VENQ SCOPE(GLOBAL), EXEC processing attempts multiple ENQ commands to acquire (or enqueue) the resource. If any of the ENQ command attempts fail, all of the resources for that VENQ command are released and the appropriate condition code is returned. See Using-the-SCOPE-parameter for more information about how enqueues are obtained for each SCOPE value. |