The OPSDEV function gets the device information from the Unit Control Block (UCB) and places it in the REXX external data queue. The value returned from OPSDEV is the number of lines placed into the external data queue.
Important! Always use either the REXX WORD function or PARSE instruction to extract the contents of a record from any line.
Each line has the following format:
Length: 4
Contents: The device number from the UCB, prefixed with a leading zero. For device number 123, this field would have the value 0123.
Length: 6
Contents: The volume serial number from DASD and TAPE devices. For non-DASD and non-TAPE devices, this field contains the character string N/A.
Note: If the volume serial field contains embedded blanks, the blanks are replaced with the underscore character. This may occur when using CA MIA with single character system aliases defined on the DEFSYS statement in MIMINIT. In this case, the pseudo-volser field, which might look like '2=GTA', is displayed by OPSDEV as '2_=GTA'. This preserves the number of words in the output record.
Length: 8
Contents: Status of the device (either ONLINE, OFFLINE, or UNAVAIL).
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. No tape device can be in the unavailable status on systems prior to z/OS 1.10.
Length: 4
Contents: The type of device is one of the following: DASD, TAPE, CTC, COMM, UREC (unit record), TERM (terminal), CONS (console), CHAR (character-oriented device), UNKN (unknown device type).
Length: 4
Contents: The qualifier on the type of device is one of the following:
Length: 8
The mount attribute of DASD volumes. Possible values are PUBLIC, PRIVATE, STORAGE, and UNKNOWN. Offline devices are always UNKNOWN. For TAPE devices, this field contains the character string MOUNT-P when a mount is pending or N/A otherwise. For non-DASD and non-TAPE devices, this field contains the character string N/A.
Length: 6
Contents: The reserve characteristic of DASD and TAPE volumes. Possible values are RSVD (reserved) and UNRSVD (unreserved). Offline devices are UNRSVD. For non-DASD and non-TAPE devices, this field contains the character string N/A.
Length: 4
Contents: The allocation count for a DASD volume. The number represents the number of data sets allocated to the device. The allocation count for offline devices is 0. For TAPE devices, this field contains the character string N/A unless a mount is pending for the device. In that case, this field contains the 4-byte binary WTO ID of the associated z/OS mount message. For non-DASD and non-TAPE devices, this field contains the character string N/A.
Length: 4
Contents: The open count for a DASD volume, representing the number of open data sets on the device. The open data set count for offline devices is 0. For TAPE and non-DASD devices, this field contains the character string N/A.
Length: 8
Contents: The name of the address space that allocated the TAPE device. For non-TAPE devices, this field contains the character string N/A.
Length: 7
Contents: Indicates whether the device is allocated. For online devices, this field contains the string ALLOC if the device is currently allocated or UNALLOC if it is not. For offline devices, this field contains the character string N/A.
Length: 8
Contents: Indicates the I/O status of the device. If a hot I/O condition is detected for the device, this field contains the string BOXED. If the device is not ready for I/O, this field contains the string NOTREADY. If an intervention-required message has been issued for the device or is about to be issued, this field contains the string INTREQ. From a technical standpoint, you should consider the device to be in an intervention-required state if this field contains the string NOTREADY or INTREQ. For online devices, this field contains the string OK if none of the above conditions exist. For offline devices, this field contains the character string N/A.
Length: 8
Contents: Indicates whether the ACL feature is installed. For TAPE devices, this field contains the string ACLINST if the ACL feature is installed. If the ACL feature is installed and is active, this field contains the string ACLACTIV; if not, it contains the string NOACL. For DASD devices, this field contains the string SMS if the volume is managed by SMS or NOTSMS if it is not. For all other device types or if the TAPE or DASD device is offline, this field contains the character string N/A.
Length: 4
Contents: For auto-switch TAPE devices, this field contains the character string AUTS unless the device is assigned to a foreign host. If the device is assigned to a foreign host, this field contains the character string AFH. For online or offline TAPE devices that are not auto-switchable, this field contains the character string NAUT. For all other device types, this field contains the character string N/A.
Length: 4
Contents: For TAPE devices that are managed by a device manager, this field contains the character string DEVM. For other online TAPE devices, this field contains the character string NODM. Known device managers include JES3 and CA MIA (when the ASSIGN=(MULTISYSTEM,password) is specified on the GTAINIT statement). Other device managers may exist. For all other device types or if the TAPE device is offline, this field contains the character string N/A.
Length: 1
Contents: Subchannel set number for the device number.
Examples: OPSDEV
say “Count of SYS* volumes =” OPSDEV(“V”,”SYS*”) do while QUEUED() > 0 pull data say data end
Produces output similar to the following:
Count of SYS* volumes = 2 02BC SYSRES ONLINE DASD 3380 PRIVATE UNRSVD 87 63... 02BE SYSTST ONLINE DASD 3380 PRIVATE UNRSVD 8 2...
OPLines = OPSDEV('D','TAPE')
say “There are” OPLines “online tape devices”
do OPLines
pull edqline
say edqline
end
Dev = OPSDEV('U','05F3*','A')
say “There are” Dev “devices matching request qualifier”
do while QUEUED() > 0
pull edqline
say edqline
end
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|