There are two methods to obtain a UCB segment address for a given device number: the UCBLOOK and IOSLOOK macros. IBM® recommends that you use the UCBLOOK rather than IOSLOOK macro.
The UCBLOOK macro is the general method to obtain a UCB segment address for a given device. You can obtain any UCB address, including UCBs for dynamic devices, UCBs with 4-digit device numbers, and UCBs which reside above 16 megabytes. See Obtaining UCB information (general methods) for more information about UCBLOOK.
The IOSLOOK macro is an older, limited method to obtain a UCB segment for a given device. It obtains addresses only for static or installation-static devices with 3-digit device numbers and with UCBs residing below 16 megabytes.
Although the IOSCMXA, IOSCMXR, IOSUPFA, and IOSUPFR macros might provide better performance than the UCBLOOK macro, other factors need to be considered. Table 1 can help you determine which of the macros for obtaining the addresses of UCB segments is most appropriate for your application.
Feature | UCBLOOK | IOSCMXA |
IOSCMXR |
---|---|---|---|
Function | Obtains the address of the following segments
for a given device number:
Pins the UCB with the PIN parameter. |
IOSCMXA — Obtains the address of UCB common
extension for a given UCB common segment address. Note that the captured
address is obtained for a given captured UCB common segment address. IOSUPFA — Obtains the address of UCB prefix extension |
IOSCMXR — Obtains the address of UCB common
extension for a UCB common segment address. Note that the captured
address is obtained for a given captured UCB common segment address. IOSUPFR — Obtains the address of UCB prefix extension IOSDCXR — Obtains the address of UCB device class extension for a UCB common segment address. Note that the captured address is obtained for a given captured UCB common segment address. |
Parameter Handling | In a parameter list | In a parameter list | Not in a parameter list The addresses are passed in general purpose registers (GPRs) . |
Recovery | Provided by macro | Caller must provide | Caller must provide |
Environment | Can be issued in primary or access register (AR) ASC mode | Must be issued in primary ASC mode | Must be issued in primary ASC mode |
The IOSCMXA, IOSCMXR, IOSDCXR, IOSUPFA, and IOSUPFR macros are described in z/OS MVS Programming: Authorized Assembler Services Reference EDT-IXG.
You can use the UCBINFO macro to obtain device information from a UCB. For example, you can obtain information about device pathing, information about alias UCBs for a parallel access volume, and reasons why a device is offline. The UCBINFO macro is described in z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO.
These topics provide basic information to help you develop application programs that are to run in an environment where dynamic I/O configuration is used.