This general macro is used to define to the control program a shared
resource and to control access to the resource among ECBs. This macro
is used with the DEQC macro.
Format
- label
- A symbolic name can be assigned to the macro statement.
- BLOCK=address
- If specified, it is the address of an 8-byte area which contains the ENQC
resource name. BLOCK and LEVEL are mutually exclusive.
- LEVEL=Dx
- If specified, it is a file address reference word (D0-DF) which contains
the name of resource. BLOCK and LEVEL are mutually exclusive.
- WAIT=label1
- The label of an instruction to be given control if the ECB waited before
gaining control of the resource. Otherwise, the next sequential
instruction will be given control on return from the execution of the
macro. WAIT and NOWAIT parameters are mutually exclusive.
- NOWAIT=label2
- The label of an instruction to be given control if the named resource is
already in use by another ECB. If specified and the resource is already
in use control will be passed to the specified label without the ECB giving up
control. NOWAIT and WAIT parameters are mutually exclusive.
- QUAL
- Subsystem qualification for the resource. The default value is
U.
- U
- Subsystem qualification applies. The resource name is subsystem
unique and is qualified by the Data Base Index (DBI) value for the
subsystem.
- S
- System-wide qualification applies. The resource name is not
subsystem unique. Any ECB issuing an ENQC with this system name and
QUAL=S will be enqueued on the same named resource. If two ENQCs are
issued with the same resource name but different QUAL values, then two
different resource names are assumed to exist. The DEQC must have the
same QUAL value as the ENQC.
- TIMEOUT=n|(Rx)
- The number of seconds that the ECB expects to hold the resource.
The value may be specified by a self-defining value (from 0 to 4096) or by a
value (from 0 to 32 768) in a register.
The timeout does not start until there is another ECB waiting. If
the time elapses, the ECB will be exited with a system error. A default
value of 180 seconds is used if none is specified. If 0 is specified,
the timeout function is turned off.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- When you specify the LEVEL parameter, the symbolic name of the shared
resource, 8 characters in length, must be in CE1FAx, where x is the specified
level.
- When you specify the BLOCK parameter, the symbolic name of the shared
resource, 8 characters in length, must be in the 8-byte area pointed to by the
BLOCK parameter.
Return Conditions
- If neither WAIT or NOWAIT is specified control is returned to the next
sequential instruction when the ECB owns the resource. If the resource
is already in use and NOWAIT is specified, control is given to the specified
label without loss of control for the ECB, but the ECB will not own the
resource. If the resource was already in use and WAIT was specified,
control is given to the specified label when the ECB owns the resource.
- The contents of R14 and R15 are unknown. The contents of R0-R7 are
preserved across this macro call.
Programming Considerations
- This macro can be executed on any I-stream.
- If LEVEL is used, it must not be holding a block. If it is, a
system error is executed and the ECB is exited.
- When finished with the resource, the ECB must issue a DEQC macro.
If the ECB exits holding a resource, a system error is issued and the resource
is freed.
Examples
None.