Use this system macro to define a shared resource to the control program
and to control access to the resource among entry control blocks
(ECBs). The SANQC macro is similar to the ENQC macro. However,
if the caller of the SANQC macro has to wait for access to the shared
resource, the caller can be interrupted by a signal. This macro is used
with the DEQC macro.
Required Authorizations
|
Key0
| Restricted
| System
| Common Storage
|
| X
|
|
|
Format
- label
- A symbolic name can be assigned to the macro statement.
- BLOCK=address
- If specified, this is the address of an 8-byte area that contains the name
of the resource. BLOCK and LEVEL are mutually exclusive.
- LEVEL=Dx
- If specified, this is a file address reference word (D0-DF) that
contains the name of the resource. BLOCK and LEVEL are mutually
exclusive.
- WAIT=label1
- The label of an instruction that is given control if the ECB waited before
gaining control of the resource. Otherwise, SANQC macro processing
returns control to the next sequential instruction (NSI). WAIT and
NOWAIT 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 is passed to the specified label without the ECB giving up
control. NOWAIT and WAIT are mutually exclusive.
- QUAL
- Qualification of the resource name. The default value is U.
- U
- Subsystem qualification applies. The resource name is subsystem
unique and is qualified by the database index (DBI) value for the
subsystem.
- S
- Systemwide qualification applies. The resource name is not
subsystem unique; that is, all ECBs in the TPF system that issue a SANQC
macro with the same resource name and QUAL=S coded are enqueued on the same
resource. If two SANQC or ENQC macros are issued with the same resource
name, but different QUAL values are coded, two different resources are assumed
to exist. The SANQC macro and its corresponding DEQC macro must have
the same QUAL value coded.
- EINTR=label3
- The label of an instruction to be given control if SANQC macro processing
is interrupted by a signal. When control is given to the instruction
specified by the EINTR keyword, the caller does not have access to the shared
resource. Because the caller does not have access to the shared
resource, a system error results if the DEQC macro is called.
Entry Requirements
- Register 9 (R9) must contain the address of the ECB being
processed.
- When the LEVEL keyword is specified, the caller must store the 1-8
character symbolic name of the shared resource in file address reference word
CE1FAx, where x is a data level (0-F).
- When BLOCK is specified, the caller must store the 1-8 character
symbolic name of the shared resource in the 8-byte area pointed to by the
address specified for the BLOCK keyword.
Return Conditions
- If neither the WAIT or NOWAIT keyword is specified, control is returned to
the next sequential instruction (NSI) when the ECB owns the resource.
- If the resource is already in use and the NOWAIT keyword is specified,
control is given to the label specified by the NOWAIT keyword without the ECB
losing control, but the ECB does not own the resource.
- If the resource is already in use and the WAIT keyword is specified,
control is given to the label specified by the WAIT keyword when the ECB owns
the resource.
- If the calling process receives a signal before the resource becomes
available, control is given to the label specified by the EINTR keyword, but
the ECB does not own the resource.
- The contents of R14 and R15 are unknown. The contents of
R0-R7 are preserved across this macro call.
Programming Considerations
Examples
None.