Previous Topic: OPSDELV Function

Next Topic: Format of Device Information Returned

OPSDEV Function

The OPSDEV function obtains device information synchronously. Therefore, you can use it in AOF rules.

Note: You can use the OPSDEV function in OPS/REXX or AOF rules.

This function has the following format:

var = OPSDEV({function,qualifier}[,status])
function

Describes the type of information retrieval that OPSDEV does. Possible values are:

U

Extracts device information by UCB. The qualifier is a four-character device number or a mask. You can use the % character, * character, or both as single character wildcards in the mask. When a mask is specified, information for all device numbers that match the mask is returned. For example, the following REXX statement returns information about all online devices whose device numbers contain 123 in the first three positions:

Devices=OPSDEV('U','123*')

V

Extracts information by VOLSER. The qualifier is a six-character volume serial. You can use the % as a single character wildcard and the * symbol only as a suffix wildcard. For example, the following REXX statement returns information about all online DASD volumes whose volsers begin with an S and whose third through fifth characters are RES:

Devices=OPSDEV('V','S%RES*')

Only DASD devices are searched for matching volsers.

D

Extracts information about devices in general. The qualifier determines the type of device about which to return information. The values can be:

  • DASD
  • TAPE
  • UREC (Unit Record devices)
  • COMM (Communications devices)
  • CTC (Channel to Channel adapters)
  • TERM (Terminals)
  • (All devices)

For example, this REXX statement returns information about all online Channel to Channel adapters:

Devices=OPSDEV('D','CTC')

qualifier

Indicates the devices for which information is returned.

status

(Optional) Specifies which devices are to be considered based on online, offline, or unavailable status. Possible values for status are:

O

Only returns information on online devices.

This is the default.

F

Only returns information on offline devices. This includes unavailable devices since unavailable devices are also offline.

U

Only returns information on unavailable devices.

A

Returns information on both online and offline devices, including unavailable devices.

Note: The UNAVAILABLE device status was introduced with z/OS 1.10 and is currently only valid for tape devices on systems running z/OS 1.10 or above. Specifying a status of U for the OPSDEV function on systems prior to z/OS 1.10 will result in no devices being returned.