The OPSDEV function obtains device information synchronously.
Note: Use the OPSDEV function in OPS/REXX or AOF rules.
OPSDEV has the following format:
var = OPSDEV({function,qualifier}[,status][,subchannel set])
Describes the type of information retrieval that OPSDEV performs. Possible values are:
Extracts device information by Unit Control Block (UCB). The qualifier is a three-, four-, or five-digit device number or a mask. When a three- or four-digit device number is specified, the OPSDEV function returns information about the device that is logically in subchannel set 0. When a five-digit device number is specified, the OPSDEV function translates it in the format sdddd, where s is the subchannel set number and dddd is the four-digit device number. 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. The subchannel set value cannot be masked. 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*')
Extracts information by volume serial number (VOLSER). The qualifier is a six-character volume serial. You can use the % character as a single-character wildcard and the * character only as a suffix wildcard. For example, the following REXX statement returns information about all online DASD volumes whose volume serial numbers begin with an S and whose third through fifth characters are RES:
Devices=OPSDEV('V','S%RES*')
Note: Only DASD devices are searched for matching volume serial numbers.
Extracts information about devices in general. The qualifier determines the type of device about which to return information. The values can be:
For example, this REXX statement returns information about all online Channel to Channel adapters:
Devices=OPSDEV('D','CTC')
Indicates the devices for which information is returned.
(Optional) Specifies the devices to consider, based on online, offline, or unavailable status. Possible values for status are:
Returns information about online devices only. O is the default status value.
Returns information about offline and unavailable devices only.
Note: Unavailable devices are also considered to be offline
Returns information about unavailable devices only.
Returns information about both online and offline devices, including unavailable devices.
Note: The UNAVAILABLE device status was introduced with z/OS 1.10 and is 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 before z/OS 1.10 results in no devices being returned.
(Optional) Specifies within which subchannel set to search for the device. This parameter is valid only for U function and when you specify a four-digit qualifier. For the five-digit qualifier, this parameter, if specified, is ignored. Possible values for subchannel set are:
Search within subchannel set 0. 0 is the default subchannel set value.
Search within subchannel set 1.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|