When using shared DASD, IBM® recommends
that your application issue ISGENQ SCOPE=SYSTEMS RESERVEVOLUME=YES
or ENQ SCOPE=SYSTEMS and define the resource name on which you are
serializing, rather than use the RESERVE macro. However, to ensure
successful serialization of shared DASD, you can use RESERVE if one
of the following is true:
- Global resource serialization is not active
- ISGENQ services are not available until the Global Resource Serialization
address space is initialized. This is very unlikely and only true
if your code runs very early in the IPL processing (prior to the Global
Resource Serialization address space being initialized). The Global
Resource Serialization address space is created and available in all
Global Resource Serialization modes and therefore all z/OS® environments.
- Your installation is not using SMS to manage the DASD.
- The RESERVE application programming interfaces, either through
the RESERVE or ISGENQ macros, can result in a DASD RESERVE or an ENQ
being obtained, or both. In all cases, an ENQ is obtained that is
defined by the caller through the QNAME/RNAME. The scope of the ENQ
and whether the hardware RESERVE is issued by the system is controlled
by several factors:
- A hardware RESERVE is not issued when one of the following is
true:
- The volume is not defined as being SHARED through the IODF.
- The volume is mapped by Virtual I/O (VIO).
- The current Global Resource Serialization RNL indicates that the
RESERVE should be converted to a SYSTEMS level ENQ (The resource does
not match an entry in the SYSTEMS EXCLUSION RNL and does match an
entry in the RESERVE Conversion RNL)
- The RESERVE is converted by the ISGNQXITBATCH exit, or ISGNQXITBATCHCND
exit, or both.
- The scope of the ENQ originates as SYSTEMS:
- If the above volume attributes indicate that the system should
issue the hardware RESERVE, the associated ENQ can be changed to SYSTEM
(local ENQ) when the QNAME/RNAME match an entry in the exclusion RNL.
In general, this would be the case when the installation wants the
RESERVE to occur and therefore does not require the associated SYSTEMS
ENQ. The SYSTEM ENQ in this case would serialize the device across
multiple users on the same system. The RESERVE serialized the device
across systems.
- The ENQ can stay as a SYSTEMS ENQ in cases where the RESERVE is
not issued due to the conversion RNL. In this case, the ENQ serializes
the resource across z/OS systems.
All of these factors are generally not a concern of the caller
of the RESERVE service. The caller is using RESERVE because it supports
serialization of the volume across systems through hardware reserve.
The installation controls the factors defined above based on its requirements.
You can also use the ENQ, DEQ, EXTRACT, and GETDSAB
macros when working with shared DASD.
To obtain the address of a task input/output table (TIOT) entry,
from which you can obtain the unit control block (UCB) address of
a device, you can use the GETDSAB macro or the EXTRACT macro. Your
installation may have installed products that require the use of the
GETDSAB macro to obtain the address of the product's TIOT entries.
If you plan to use the EXTRACT macro, first check the documentation
for the related product to ensure that the product does not require
the use of the GETDSAB macro.