Obtaining UCB addresses for a specified device number

You can use the UCBLOOK macro to obtain actual (not captured) addresses of the following segments for a UCB:
  • UCB common segment
  • UCB common extension segment
  • UCB prefix extension segment
The input UCBs can be associated with:
  • A device with a 3-digit hexadecimal number
  • A device with a 4-digit hexadecimal number
  • For DASD and tape devices, the volume serial number
IBM® recommends using the UCBLOOK macro to obtain UCB addresses.

The PIN parameter on the UCBLOOK macro allows the caller to pin the UCB whose address is to be obtained. See Pinning and unpinning UCBs for more information on pinning and unpinning.

The IOSLOOK macro is restricted to below 16 megabyte UCBs for static or installation-static devices with 3-digit device numbers. Like UCBLOOK, IOSLOOK returns the UCB address associated with a given device number. However, UCBLOOK has several advantages that IOSLOOK does not:
  • UCBLOOK can be used for dynamic devices, as well as static and installation-static devices. UCBLOOK provides the option to limit the look-up to static and installation-static devices, or to also include dynamic devices.
  • UCBLOOK can be used for devices with 4-digit device numbers as well as for devices with 3-digit device numbers.
  • UCBLOOK can be used for above 16 megabyte UCBs as well as below 16 megabyte UCBs.
  • UCBLOOK allows an EBCDIC device number or, for DASD and tape devices, a volume serial number, to be used as a look-up argument.
  • UCBLOOK supports AR-mode callers.