To use the UCB scan service, the caller must:
- Obtain a 100-byte work area that starts on a doubleword boundary.
To start with the first UCB in the system or the first UCB in a device
class, clear the work area to binary zero. To continue scanning UCBs,
do not change the work area between calls to the scan service routine.
- Build a parameter list.
Parameter List for the UCB Scan Routine:
- Address of the 100-byte work area provided by the caller.
- Address of the byte containing the device class to which the search
is being restricted. See the topic “Limiting the UCB Scan” for information
on how to restrict the search to a specific device. If all UCBs are
to be scanned, the byte pointed to must contain X'00'.
- Address of the word in which the UCB scan service is to return
the UCB address. The high order bit of this field must be 1 to indicate
it is the last word in the parameter list.
Set up the registers to contain the following information:
- Register
- Contents
- 1
- Address of the parameter list
- 13
- Address of caller's 18-word save area
- 14
- Caller's return address
- 15
- Entry point of the UCB scan routine. (The CVTUCBSC field in the
CVT contains the entry point address.)
Note: The data areas that the caller passes to the UCB scan service
must be addressable in the addressing mode of the caller. If the program
runs in 31-bit addressing mode, the data areas can be anywhere; otherwise,
the data areas must be below 16 megabytes.