DBL$DEVCLT

Return the class and type of a device

 

 

VSupported on OpenVMS

 

xcall DBL$DEVCLT([channel], [device], [class], [type], [sec_class][, sec_type])

Arguments

channel

(optional) An expression that evaluates to the channel on which the device (or a file that resides on that device) was opened in a previous OPEN statement. (n)

device

(optional) A field or literal that contains the device specification (used if the device is not currently open). (a)

class

(optional) Returned with a string that identifies the device class. The returned strings are shown in parentheses in the Device class (value) column of the Returned Device Class and Type table. Class must be at least four bytes. (a)

type

(optional) Returned with a string that identifies the device type. The returned strings are shown in the Device types column of the Returned Device Class and Type table. Type must be at least eight bytes. (a)

sec_class

(optional) Returned with a string that identifies the secondary device class. The returned strings are shown in parentheses in the Device class (value) column of the Returned Device Class and Type table. Sec_class must be at least four bytes. (a)

sec_type

(optional) Returned with a string that identifies the secondary device type. The returned strings are shown in the Device types column of the Returned Device Class and Type table. Sec_type must be at least eight bytes. (a)

Discussion

The DBL$DEVCLT subroutine returns the class and type of a device:

Returned Device Class and Type

Device class (value)

Device types

Disk (DISK)

The particular type (such as RA80, RX50) is returned.

Magtype (TAPE)

The particular type (such as TU78, TK50) is returned.

Terminal (TERM)

The particular type (VT100, LA36) is returned. An unknown type is returned as TTYUNKNWN; any VT200 series is returned as VT200SRS; any PRO series is returned as PRO.

Line printer (LP)

The particular type (such as LP11, LA11) is returned.

Card reader (CARD)

The particular type (such as CR11) is returned.

Mailbox (MLBX)

The particular type (such as MBX, NULL) is returned.

Workstation (WKST)

The particular type (such as VS100, VS125, VS300) is returned as VS300.

Channel should not be specified in the same calling sequence as device and vice versa. If the device is open, use a call of this format:

xcall dbl$devclt(channel,, class, type)

If the device is not open, use a call of this format:

xcall dbl$devclt(, device, class, type)

If both channel and device are specified, channel is used and device is ignored.

The strings moved to class, type, sec_class, and sec_type are moved according to the rules for moving alpha data. (See Moving alpha data to an alpha destination for more information on assigning alpha values.)

The arguments sec_class and sec_type are the same as class and type, except in cases where a secondary device is associated with the primary device. Two examples of this condition follow: