Finding the UCB address for the RESERVE macro

When using shared DASD, IBM® recommends that your applications issue ENQ SCOPE=SYSTEMS and define the resource name on which you are serializing, rather than using the RESERVE macro. However, to ensure successful serialization of shared DASD, you need to use RESERVE if one of the following is true:

This topic explains procedures for finding a particular UCB among those that are allocated to the current address space for use by the RESERVE macro. To search other UCBs, you can issue certain other macros but it is unreliable unless you serialize those accesses. While your data sets remain allocated, the UCBs will not disappear. It also shows a sample assembler language subroutine that issues the RESERVE and DEQ macros and can be called by routines written in higher level languages.