1 Introduction
2 Ground Rules

Building a File System
3 File Systems
4 File Content Data Structure
5 Allocation Cluster Manager
6 Exceptions and Emancipation
7 Base Classes, Testing, and More
8 File Meta Data
9 Native File Class
10 Our File System
11 Allocation Table
12 File System Support Code
13 Initializing the File System
14 Contiguous Files
15 Rebuilding the File System
16 Native File System Support Methods
17 Lookups, Wildcards, and Unicode, Oh My
18 Finishing the File System Class

The Init Program
19 Hardware Abstraction and UOS Architecture
20 Init Command Mode
21 Using Our File System
22 Hardware and Device Lists
23 Fun with Stores: Partitions
24 Fun with Stores: RAID
25 Fun with Stores: RAM Disks
26 Init wrap-up

The Executive
27 Overview of The Executive
28 Starting the Kernel
29 The Kernel
30 Making a Store Bootable
31 The MMC
32 The HMC
33 Loading the components
34 Using the File Processor
35 Symbols and the SSC
36 The File Processor and Device Management
37 The File Processor and File System Management
38 Finishing Executive Startup

Users and Security
39 Introduction to Users and Security
40 More Fun With Stores: File Heaps
41 File Heaps, part 2
42 SysUAF
43 TUser
44 SysUAF API

Terminal I/O
45 Shells and UCL
46 UOS API, the Application Side
47 UOS API, the Executive Side
48 I/O Devices
49 Streams
50 Terminal Output Filters
51 The TTerminal Class
52 Handles
53 Putting it All Together
54 Getting Terminal Input
55 QIO
56 Cooking Terminal Input
57 Putting it all together, part 2
58 Quotas and I/O

UCL
59 UCL Basics
60 Symbol Substitution
61 Command execution
62 Command execution, part 2
63 Command Abbreviation
64 ASTs
65 Expressions, Part 1
66 Expressions, Part 2: Support code
67 Expressions, part 3: Parsing
68 SYS_GETJPIW and SYS_TRNLNM
69 Expressions, part 4: Evaluation

UCL Lexical Functions
70 PROCESS_SCAN
71 PROCESS_SCAN, Part 2
72 TProcess updates
73 Unicode revisted
74 Lexical functions: F$CONTEXT
75 Lexical functions: F$PID
76 Lexical Functions: F$CUNITS
77 Lexical Functions: F$CVSI and F$CVUI
78 UOS Date and Time Formatting
79 Lexical Functions: F$CVTIME
80 LIB_CVTIME
81 Date/Time Contexts
82 SYS_GETTIM, LIB_Get_Timestamp, SYS_ASCTIM, and LIB_SYS_ASCTIM
83 Lexical Functions: F$DELTA_TIME
84 Lexical functions: F$DEVICE
85 SYS_DEVICE_SCAN
86 Lexical functions: F$DIRECTORY
87 Lexical functions: F$EDIT and F$ELEMENT
88 Lexical functions: F$ENVIRONMENT
89 SYS_GETUAI
90 Lexical functions: F$EXTRACT and F$IDENTIFIER
91 LIB_FAO and LIB_FAOL
92 LIB_FAO and LIB_FAOL, part 2
93 Lexical functions: F$FAO
94 File Processing Structures
95 Lexical functions: F$FILE_ATTRIBUTES
96 SYS_DISPLAY
97 Lexical functions: F$GETDVI
98 Parse_GetDVI
99 GetDVI
100 GetDVI, part 2
101 GetDVI, part 3
102 Lexical functions: F$GETJPI

Glossary/Index


Download sources
Download binaries

UCL Lexical functions - F$GETDVI

F$GETDVI is the UCL wrapper for the SYS_GETDVI system call. We briefly introduced this system call back in article 62. Here is the definition:

F$GETDVI returns a specific piece of information about the specified device.

Format
F$GETDVI(devicename,item{,pathname})

Return Value
Either an integer or a string, depending upon the item requested. The table below indicates the valid items and the corresponding return values.

Arguments
devicename

Specifies the name of the device for which you are requesting information.

item

Specifies the type of device information to return. See the table below.

pathname

Specifies the path name for a multipath-capable device. If specified, it is validated against the existing paths for the specified device. If such path does not exist, an error is returend - even if the requested item doesn't make use of the path name.

Description
F$GETDVI invokes the GETDVI system service to return information on the specified device. Use F$DEVICE to iterate through available devices. In addition to the items returned by the GETDVI system service, "EXISTS" is also a valid item for F$GETDVI. The following table lists all valid items.

ItemInformation returned
ACCESSTIME_RECORDEDTRUE if volume supports recording of access times. FALSE otherwise.
ACPPIDAncilllary control process (ACP) identification.
ACPTYPEACP type code: F11V1, F11V12, F11V3, F11V4, F11V5, F64, HBS, JNL, MTA, NET, REM, UCX, or ILLEGAL. ILLEGAL is returned if the device is not mounted, mounted using /FOREIGN, or the ACPTYPE is not defined.
ALLTRUE if the device is allocated. FALSE otherwise.
ALLDEVNAMAllocation class device name
ALLOCLASSAllocation class of the host.
ALT_HOST_AVAILTRUE if host serving the alternate path is available. FALSE otherwise.
ALT_HOST_NAMEName of the host serving the alternate path
ALT_HOST_TYPEHardware type of the host serving the alternate path.
AVAILABLE_PATH_COUNTNumber of available working paths for a multipath-capable device.
AVLTRUE if device is available for use. FALSE otherwise.
CCLTRUE if the device is a carriage control device. FALSE otherwise.
CLUSTERVolume cluser size.
CONCEALEDTRUE if the logical device name translates to a concealed device. FALSE otherwise.
CYLINDERSNumber of cylinders on the volume (local disks only).
DEVBUFSIZDevice buffer size.
DEVCHARDevice characteristics.
DEVCHAR2Additional device characteristics.
DEVCLASSDevice class.
DEVDEPENDDevice dependent information.
DEVDEPEND2Additional device dependent information.
DEVICE_MAX_IO_SIZEThe maximum contiguous transfer size supported by the device driver. Note that other software layers, such as RMS, may impose a smaller size.
DEVICE_TYPE_NAMEDevice type name. For some hardware, such as SCSI, the device type is retrieved from the hardware device itself.
DEVLOCKNAMA unique lock name for the device.
DEVNAMDevice name.
DEVSTSDevice status.
DEVTYPEDevice type.
DFS_ACCESSTRUE to indicate a remote virtual disk. FALSE otherwise.
DIRTRUE if the device is file structured. FALSE otherwise.
DMTTRUE if device is marked for dismount. FALSE otherwise.
DUATRUE if device is generic. FALSE otherwise.
ELGTRUE if device has error logging enabled.
ERASE_ON_DELETETRUE if files are zeroed upon deletion on the volume. FALSE otherwise.
ERRCNTError count on device. If pathname is specified, the count is only for that pathname, otherwise it is the aggregate for all paths.
ERROR_RESET_TIMETime at which the error count was reset
EXISTSTRUE if the device exists on the system. FALSE otherwise.
EXPSIZECurrent expansion limit on the volume.
FC_HBA_FIRMWARE_REVSame as FIRMWARE.
FC_NODE_NAMEFibre Channel host bus adapter node name.
FC_PORT_NAMEFibre Channel host bus adapter port name.
FIRMWARE_REVHardware firmware revision information. If hardware doesn't support this, a null string is returned.
FODTRUE if the device is a files-oriented device. FALSE otherwise.
FORTRUE if the device is mounted using /FOREIGN. FALSE otherwise.
FREEBLOCKSNumber of free space on the volume (disks only).
FULLDEVNAMFully qualified device name.
GENTRUE If device is generic. FALSE otherwise.
HARDLINKS_SUPPORTEDTRUE if volume's file system supports POSIX hardlinks. FALSE otherwise.
HOST_AVAILTRUE if host serving the primary path is available. FALSE otherwise.
HOST_COUNTNumber of hosts that make the device available to a UOS Cluster.
HOST_NAMEName of the host serving the primary path.
HOST_TYPEHardware type of the host serving the primary path.
IDVTRUE if the device is capable of producing input. FALSE otherwise.
LAN_ALL_MULTICAST_MODETRUE if the device is enabled to receive all multicast packets rather than only packets addressed to the enabled multicast addresses. FALSE otherwise.
LAN_AUTONEG_ENABLEDTRUE if device is set to autonegotiate the speed and duplex settings. FALSE otherwise.
LAN_DEFAULT_MAC_ADDRESSThe default MAC address of the device. Null is returned for non-network devices.
LAN_FULL_DUPLEXTRUE if the device is operating in full-duplex mode. FALSE otherwise.
LAN_JUMBO_FRAMES_ENABLEDTRUE if jumbo frames are enabled. FALSE otherwise.
LAN_LINK_STATE_VALIDTRUE if the device driver correctly maintains the link status. FALSE otherwise.
LAN_LINK_UPTRUE if the link is up. FALSE otherwise.
LAN_MAC_ADDRESSCurrent MAC address of the device. Null is returned for non-network devices.
LAN_PROMISCUOUS_MODETRUE if device is enabled to receive all packets rather than those matching its MAC. FALSE otherwise.
LAN_PROTOCOL_NAMEName of the LAN protocol running on the device. Null is returned for non-network devices.
LAN_PROTOCOL_TYPEType of LAN protocol running on the device. Null is returned for non-network devices.
LAN_SPEEDSpeed of the LAN device in megabits per second. Null is returned for non-network devices.
LOCKIDClusterwise lock identification.
LOGVOLNAMLogical volume name.
MAILBOX_BUFFER_QUOTACurrent mailbox quota.
MAILBOX_INITIAL_QUOTAInitial mailbox quota.
MAXBLOCKSize of volume in bytes.
MAXFILESMaximum number of files on volume (disks only). 0 if no limit.
MBXTRUE if device is a mailbox. FALSE otherwise.
MEDIA_IDNon-decoded media ID. Null if no media on device.
MEDIA_NAMEName of media type.
MEDIA_TYPEDevice name prefix.
MNTTRUE if the device is mounted. FALSE otherwise.
MOUNT_TIMETime at which the device was mounted.
MOUNTCNTNumber of times the device has been mounted on the local system.
MOUNTVER_ELIGIBLETRUE if the volume is eligible to udnergo mount verification. FALSE otherwise.
MPDEV_AUTO_PATH_SW_CNTNumber of times a multipath device has autmatically switched paths due to I/O errors or due to falling back to a local path from a remote path.
MPDEV_CURRENT_PATHCurrent path name for multipath devices. If the device is not part of a multipath set, this returnes the name of the device path. Returns null string if device doesn't support multipathing.
MPDEV_MAN_PATH_SW_CNTNumber of times a multipath device has manually switched paths.
MT3_DENSITYCurrent density of the tape.
MT3_SUPPORTEDTRUE if device supports densities. FALSE otherwise.
MULTIPATHTRUE if the device is a member of a multipath set. FALSE otherwise.
MVSUPMSGTRUE if mount verification OPCOM messages are currently supressed on this device. FALSE otherwise.
NETTRUE if device is a network device. FALSE otherwise.
NEXTDEVNAMDevice name of the next volume in a volume set (disks only).
NOCACHE_ON_VOLUMETRUE if device is mounted with no caching. FALSE otherwise.
NOHIGHWATERTRUE if high-water marking is disabled on the device. FALSE otherwise.
NOSHARE_MOUNTEDTRUE if the volume is mounted with /NOSHARE. FALSE otherwise.
ODS2_SUBSET0TRUE if volume mounted on the device only supports a subset of the ODS-2 file structure.
ODS5TRUE if volume is mounted OS5. FALSE otherwise.
ODVTRUE if device is capable of providing output.
OPCNTOperation count of the device. If the pathname is specified, only the operation count for that path is returned. Otherwise, the aggregate count for all paths is returned.
OPRTRUE if the device is an operator. FALSE otherwise.
OWNUICOwner ID of the device owner.
PATH_AVAILABLETRUE if the specified path is vailable. FALSE otherwise. If pathname is omitted, information about the current path of the device is returned.
PATH_NOT_RESPONDINGTRUE if the specified path is marked as not responding. FALSE otherwise. If pathname is omitted, information about the current path of the device is returned.
PATH_POLL_ENABLEDTRUE if the specified path is enabled for multipath polling. FALSE otherwise. If pathname is omitted, information on the current path of the device is returned.
PATH_SWITCH_FROM_TIMETime from which this path was switched.
PATH_SWITCH_TO_TIMETime to which this path was switched.
PATH_USER_DISABLEDTRUE if specified path has been disabled. FALSE otherwise. If pathname is omitted, information on the current path of the device is returned.
PIDProcess ID of the device owner.
PREFERRED_CPUA 64-bit integer where the corresponding CPU index that is the preferred CPU for this device is set to 1.
PREFERRED_CPU_BITMAPEquivalent to PREFERRED_CPU except that the result is a string of 0s and 1s corresponding to the bits returned by PREFERRED_CPU.
PROT_SUBSYSTEM_ENABLEDTRUE if the device is mounted with the protection subsystems enabled. FALSE otherwise.
QLENCurrent queue length of the device. This is the number of I/O requests in the device's driver.
RCKTRUE if the device has reach checking enabled. FALSE otherwise.
RCTTRUE if the disk contains RCT. FALSE otherwise.
RECTRUE if the device is record oriented. FALSE otherwise.
RECSIZCurrent maximum blocked record size of device, in bytes.
REFCNTReference count of processes using the device.
REMOTE_DEVICETRUE if the device is remote. FALSE otherwise.
RNDTRUE if device allows random access. FALSE otherwise.
ROOTDEVNAMEDevice name of the root volume in a volume set (disks only).
RTMTRUE if the device is real-time. FALSE otherwise.
SCSI_DEVICE_FIRMWARE_REVFirmware revision number of a SCSI device. Null returned for other devices.
SDITRUE if the device is single-directory structured. FALSE otherwise.
SECTORSNumber of sectors per track (disks only). 0 is returned for disks without those metrics available (such as virtual disks).
SERIALNUMVolume serial number (disks only). For non-disks, if the device reports a serial number, it is returned here. Otherwise null.
SERVED_DEVICETRUE if this is a served device. FALSE otherwise.
SET_HOST_TERMINALTRUE if the device is a remote terminal from a remote node (via SET HOST). FALSE otherwise.
SHDW_CATCHUP_COPYINGTRUE if the device is a member that is the target of a full copy operation. FALSE otherwise.
SHDW_COPIER_NODEThe name of the node that is actively performing the copy or merge operation.
SHDW_DEVICE_COUNTThe total number of devices in the shadow set, including devices being added as copy targets.
SHDW_GENERATIONCurrent internal revision number for the shadow set.
SHDW_MASTERTRUE if this device is a shadow set.
SHDW_MASTER_MBRName of master member unit used for merge, copy repair, and recovery operations.
SHDW_MASTER_NAMEDevice name representing the name of the shadow set that this device belongs to.
SHDW_MBR_COPY_DONEThe percent of the copy operation completed on this shadow set member unit.
SHDW_MBR_COUNTThe total number of devices in the shadow set, not including devices being added as copy targets.
SHDW_MBR_MERGEThe percent of the merge operation complete on this member unit.
SHDW_MBR_READ_COSTRead cost value for this unit in the shadow set.
SHDW_MEMBERTRUE if the device is a member of a shadow set. FALSE otherwise.
SHDW_MERGE_COPYINGTRUE if the device is a merge member of a shadow set.
SHDW_MINIMERGE_ENABLETRUE if the device will undergo a min-merge instead of a full merge, if a system in the cluster crashes.
SHDW_NEXT_MBR_NAMEDevice name of the next member in the shadow set. If the virtual shadow set device name is passed, the first device in the shadow set is returned. If there are no more members, null is returned.
SHDW_READ_SOURCEThe name of the member unit that will be used for reads at this time. This will be the unit with the lowest sum of queue length and read cost.
SHDW_SITEThe site value for the device. This is set by SET DEVICE or SET SHADOW.
SHDW_TIMEOUTThe user-specified timeout value st for the device. If not set, the system default value is used.
SHRTRUE if the device is shareable. FALSE otherwise.
SPLTRUE if the device is being spooled. FALSE otherwise.
SPLDEVNAMEName of the device being spooled.
SQDTRUE if the device is sequential block-oriented.
STSStatus information.
SWLTRUE if the device is software write-locked. FALSE otherwise.
TOTAL_PATH_COUNTNumber of paths for a multipath device.
TRACKSNumber of tracks per cylinder (disks only). Will return 0 if the disk has no metrics (such as virtual disks).
TRANSCNTVolume transaction count.
TRMTRUE if the device is a terminal. FALSE otherwise.
TT_ACCPORNAMThe terminal server name and port name.
TT_ALTYPEAHDTRUE if the terminal has an alternate type-ahead buffer.
TT_ANSICRTTRUE if the terminal is an ANSI video terminal.
TT_APP_KEYPADTRUE if the terminal is in keypad applications mode.
TT_AUTOBAUDTRUE if the terminal has automatic baud rate detection.
TT_AVOTRUE if the terminal has AVO (VT100-family).
TT_BLOCKTRUE if the terminal has block mode capability.
TT_BRDCSTMBXTRUE if terminal uses mailbox broadcast messages.
TT_CHARSETA bitmap indicating the coded character set supported by the terminal.
TT_CRFILLTRUE if the terminal requires fill after CR.
TT_CS_HANGULTRUE if terminal supports the Hangul character set.
TT_CS_HANYUTRUE if terminal supports the Hanyu character set.
TT_CS_HANZITRUE if terminal supports the Hanzi character set.
TT_CS_KANATRUE if terminal supports the Kana character set.
TT_CS_KANJITRUE if terminal supports the Kanji character set.
TT_CS_THAITRUE if terminal supports the Thai character set.
TT_DECCRTTRUE if terminal is a DEC CRT terminal.
TT_DECCRT2TRUE if terminal is a DEC CRT2 terminal.
TT_DECCRT3TRUE if terminal is a DEC CRT3 terminal.
TT_DECCRT4TRUE if terminal is a DEC CRT4 terminal.
TT_DIALUPTRUE if terminal is connected to dialup.
TT_DISCONNECTTRUE if the terminal can be disconnected.
TT_DMATRUE if terminal has direct memory access mode.
TT_DRCSTRUE if the terminal supports loadable character fonts.
TT_EDITTRUE if the terminal edit flag is set.
TT_EDITINGTRUE if advanced editing is enabled.
TT_EIGHTBITTRUE if the terminal uses 8-bit ASCII character set.
TT_ESCAPETRUE if terminal generates escape sequences.
TT_FALLBACKTRUE if the terminal uses the multinational fallback option.
TT_HALFDUPTRUE if terminal is in half-duplex mode.
TT_HANGUPTRUE if the hangup flag is set.
TT_HOSTSYNCTRUE if the terminal uses host/terminal sync communication.
TT_INSERTTRUE if insert mode is the default line editing mode.
TT_LFFILLTRUE if terminal requires fill after LF.
TT_LOCALECHOTRUE if terminal has local echo set.
TT_LOWERTRUE if the terminal supports lowercase letters.
TT_MBXDSABLTRUE if mailboxes associated with the termainl will receive unsolicited input or input notification.
TT_MECHFORMTRUE if terminal has mechanical FF.
TT_MECHTABTRUE if terminal has mechanical tabs (HT).
TT_MODEMTRUE if terminal is connected to a modem.
TT_MODHANGUPTRUE if the modify hangup characterstic is set.
TT_NOBRDCSTTRUE if terminal will not receive briacast messages.
TT_NOECHOTRUE if input characters are not echoed.
TT_NOTYPEAHDTRUE if data must be solicited by a read operation.
TT_OPERTRUE if terminal is an operations terminal.
TT_PAGETerminal page/screen height.
TT_PASTHRUTRUE if PASALL mode with flow control is available.
TT_PHYDEVNAMPhysical device name associated with a handle or a virtual terminal.
TT_PRINTERTRUE if the terminal has a printer port.
TT_READSYNCTRUE if the terminal has read synchronization.
TT_REGISTRUE if the terminal has ReGID graphics.
TT_REMOTETRUE if terminal has established modem control.
TT_SCOPETrue if the terrminal is a video terminal.
TT_SECURETRUE if the terminal can recognize a secure server.
TT_SETSPEEDTRUE if the terminal line speed can be set.
TT_SIXELTRUE if the sixel is supported.
TT_SYSPWDTRUE if the system password is enabled for this terminal.
TT_TTSYNCTRUE if there is terminal/host synchronization.
TT_WRAPTRUE if CRLF should be inserted if the cursor moves beyond the right margin.
UNITUnit number of device.
VOLCHAR128-bit string indicating the volume characteristics/capabilities. If a bit is set, the feature is supported.
VOLCOUNTCount of volumes in a volume set.
VOLNAMVolume name the device is part of.
VOLNUMBERNumber of the current volume in a volume set.
VOLSETMEMTRUE if the device belongs to a volume set.
VOLSIZEThe current logical volume size.
VOLUME_EXTEND_QUANTITYNumber of bytes that files on the volume are extended by.
VOLUME_MOUNT_GROUPTRUE if the volume is mounted /GROUP.
VOLUME_MOUNT_SYSTRUE if volume is mounted /SYSTEM.
VOLUME_PENDING_WRITE_ERRNumber of pending write errors on device.
VOLUME_RETAIN_MAXMaximum retention time for the volume (via SET VOLUME/RETENTION).
VOLUME_RETAIN_MINMinimum retention time for the volume (via SET VOLUME/RETENTION).
VOLUME_SPOOLED_DEV_CBTThe number of devices spooled to the volume.
VOLUME_WINDOWDefault window size for the volume.
VPROTVOlume protection mask.
WCKTRUE if the device has write-checking enabled.
WRITETHRU_CACHE_ENABLEDTRUE if volume is mounted with write-through caching enabled.
WWIDWorldwide identifier for a Fibre Channel device.

Example
$ X = F$GETDVI("_DISKA0:","ERRCNT")
This would set X to the error count of DISKA0:.

$ X = F$GETDVI("_TERMA0:","DEVCLASS")
This would set X to "TERM".

        Function_GetDVI : begin
                              if( Missing_Parentheses( '(' ) ) then
                              begin
                                  exit ;
                              end ;
                              if( Parse_GetDVI( Err, Context ) ) then
                              begin
                                  exit ;
                              end ;
                              if( Missing_Parentheses( ')' ) ) then
                              begin
                                  exit ;
                              end ;
                              S := Context ;
                          end ;
We update Function_Reference to handle this lexical function.

// SYS_DVI descriptor codes...
const DVI_DEVCHAR = 1 ; // Get device characteristics
      DVI_ACCESSTIME_RECORDED = 2 ;
      DVI_ACPPID = 3 ;
      DVI_ACPTYPE = 4 ;
      DVI_ALL = 5 ;
      DVI_ALLDEVNAM = 6 ;
      DVI_ALLOCLASS = 7 ;
      DVI_ALT_HOST_AVAIL = 8 ;
      DVI_ALT_HOST_NAME = 9 ;
      DVI_ALT_HOST_TYPE = 10 ;
      DVI_AVAILABLE_PATH_COUNT = 11 ;
      DVI_AVL = 12 ;
      DVI_CLUSTER = 13 ;
      DVI_CONCEALED = 14 ;
      DVI_CYLINDERS = 15 ;
      DVI_DEVBUFSIZ = 16 ;
      DVI_DEVCHAR2 = 17 ;
      DVI_DEVCLASS = 18 ;
      DVI_DEVDEPEND = 19 ;
      DVI_DEVDEPEND2 = 20 ;
      DVI_DEVICE_MAX_IO_SIZE = 21 ;
      DVI_DEVICE_TYPE_NAME = 22 ;
      DVI_DEVLOCKNAM = 23 ;
      DVI_DEVNAM = 24 ;
      DVI_DEVSTS = 25 ;
      DVI_DEVTYPE = 26 ;
      DVI_DFS_ACCESS = 27 ;
      DVI_ERASE_ON_DELETE = 28 ;
      DVI_ERRCNT = 29 ;
      DVI_ERROR_RESET_TIME = 30 ;
      DVI_EXISTS = 31 ;
      DVI_EXPSIZE = 32 ;
      DVI_FC_HBA_FIRMWARE_REV = 33 ;
      DVI_FC_NODE_NAME = 34 ;
      DVI_FC_PORT_NAME = 35 ;
      DVI_FIRMWARE_REV = 36 ;
      DVI_FREEBLOCKS = 37 ;
      DVI_FULLDEVNAM = 38 ;
      DVI_HARDLINKS_SUPPORTED = 39 ;
      DVI_HOST_AVAIL = 40 ;
      DVI_HOST_COUNT = 41 ;
      DVI_HOST_NAME = 42 ;
      DVI_HOST_TYPE = 43 ;
      DVI_LAN_ALL_MULTICAST_MODE = 44 ;
      DVI_LAN_AUTONEG_ENABLED = 45 ;
      DVI_LAN_DEFAULT_MAC_ADDRESS = 46 ;
      DVI_LAN_FULL_DUPLEX = 47 ;
      DVI_LAN_JUMBO_FRAMES_ENABLED = 48 ;
      DVI_LAN_LINK_STATE_VALID = 49 ;
      DVI_LAN_LINK_UP = 50 ;
      DVI_LAN_MAC_ADDRESS = 51 ;
      DVI_LAN_PROMISCUOUS_MODE = 52 ;
      DVI_LAN_PROTOCOL_NAME = 53 ;
      DVI_LAN_PROTOCOL_TYPE = 54 ;
      DVI_LAN_SPEED = 55 ;
      DVI_LOCKID = 56 ;
      DVI_LOGVOLNAM = 57 ;
      DVI_MAILBOX_BUFFER_QUOTA = 58 ;
      DVI_MAILBOX_INITIAL_QUOTA = 59 ;
      DVI_MAXBLOCK = 60 ;
      DVI_MAXFILES = 61 ;
      DVI_MEDIA_ID = 62 ;
      DVI_MEDIA_NAME = 63 ;
      DVI_MEDIA_TYPE = 64 ;
      DVI_MOUNT_TIME = 65 ;
      DVI_MOUNTCNT = 66 ;
      DVI_MOUNTVER_ELIGIBLE = 67 ;
      DVI_MPDEV_AUTO_PATH_SW_CNT = 68 ;
      DVI_MPDEV_CURRENT_PATH = 69 ;
      DVI_MPDEV_MAN_PATH_SW_CNT = 70 ;
      DVI_MSCP_UNIT_NUMBER = 71 ;
      DVI_MT3_DENSITY = 72 ;
      DVI_MT3_SUPPORTED = 73 ;
      DVI_MULTIPATH = 74 ;
      DVI_MVSUPMSG = 75 ;
      DVI_NEXTDEVNAM = 76 ;
      DVI_NOCACHE_ON_VOLUME = 77 ;
      DVI_NOHIGHWATER = 78 ;
      DVI_NOSHARE_MOUNTED = 79 ;
      DVI_ODS2_SUBSET0 = 80 ;
      DVI_ODS5 = 81 ;
      DVI_OPCNT = 82 ;
      DVI_OWNUIC = 83 ;
      DVI_PATH_AVAILABLE = 84 ;
      DVI_PATH_NOT_RESPONDING = 85 ;
      DVI_PATH_POLL_ENABLED = 86 ;
      DVI_PATH_SWITCH_FROM_TIME = 87 ;
      DVI_PATH_SWITCH_TO_TIME = 88 ;
      DVI_PATH_USER_DISABLED = 89 ;
      DVI_PID = 90 ;
      DVI_PREFERRED_CPU = 91 ;
      DVI_PREFERRED_CPU_BITMAP = 92 ;
      DVI_PROT_SUBSYSTEM_ENABLED = 93 ;
      DVI_QLEN = 94 ;
      DVI_RECSIZ = 95 ;
      DVI_REFCNT = 96 ;
      DVI_REMOTE_DEVICE = 97 ;
      DVI_ROOTDEVNAME = 98 ;
      DVI_SCSI_DEVICE_FIRMWARE_REV = 99 ;
      DVI_SECTORS = 100 ;
      DVI_SERIALNUM = 101 ;
      DVI_SERVED_DEVICE = 102 ;
      DVI_SHDW_CATCHUP_COPYING = 103 ;
      DVI_SHDW_COPIER_NODE = 104 ;
      DVI_SHDW_DEVICE_COUNT = 105 ;
      DVI_SHDW_GENERATION = 106 ;
      DVI_SHDW_MASTER = 107 ;
      DVI_SHDW_MASTER_MBR = 108 ;
      DVI_SHDW_MASTER_NAME = 109 ;
      DVI_SHDW_MBR_COPY_DONE = 110 ;
      DVI_SHDW_MBR_COUNT = 111 ;
      DVI_SHDW_MBR_MERGE_DONE = 112 ;
      DVI_SHDW_MBR_READ_COST = 113 ;
      DVI_SHDW_MEMBER = 114 ;
      DVI_SHDW_MERGE_COPYING = 115 ;
      DVI_SHDW_MINIMERGE_ENABLE = 116 ;
      DVI_SHDW_NEXT_MBR_NAME = 117 ;
      DVI_SHDW_READ_SOURCE = 118 ;
      DVI_SHDW_SITE = 119 ;
      DVI_SHDW_TIMEOUT = 120 ;
      DVI_SPLDEVNAME = 121 ;
      DVI_STS = 122 ;
      DVI_TOTAL_PATH_COUNT = 123 ;
      DVI_TRACKS = 124 ;
      DVI_TRANSCNT = 125 ;
      DVI_TT_ACCPORNAM = 126 ;
      DVI_TT_ALTYPEAHD = 127 ;
      DVI_TT_ANSICRT = 128 ;
      DVI_TT_APP_KEYPAD = 129 ;
      DVI_TT_AUTOBAUD = 130 ;
      DVI_TT_AVO = 131 ;
      DVI_TT_BLOCK = 132 ;
      DVI_TT_BRDCSTMBX = 133 ;
      DVI_TT_CHARSET = 134 ;
      DVI_TT_CRFILL = 135 ;
      DVI_TT_CS_HANGUL = 136 ;
      DVI_TT_CS_HANYU = 137 ;
      DVI_TT_CS_HANZI = 138 ;
      DVI_TT_CS_KANA = 139 ;
      DVI_TT_CS_KANJI = 140 ;
      DVI_TT_CS_THAI = 141 ;
      DVI_TT_DECCRT = 142 ;
      DVI_TT_DECCRT2 = 143 ;
      DVI_TT_DECCRT3 = 144 ;
      DVI_TT_DECCRT4 = 145 ;
      DVI_TT_DIALUP = 146 ;
      DVI_TT_DISCONNECT = 147 ;
      DVI_TT_DMA = 148 ;
      DVI_TT_DRCS = 149 ;
      DVI_TT_EDIT = 150 ;
      DVI_TT_EDITING = 151 ;
      DVI_TT_EIGHTBIT = 152 ;
      DVI_TT_ESCAPE = 153 ;
      DVI_TT_FALLBACK = 154 ;
      DVI_TT_HALFDUP = 155 ;
      DVI_TT_HANGUP = 156 ;
      DVI_TT_HOSTSYNC = 157 ;
      DVI_TT_INSERT = 158 ;
      DVI_TT_LFFILL = 159 ;
      DVI_TT_LOCALECHO = 160 ;
      DVI_TT_LOWER = 161 ;
      DVI_TT_MBXDSABL = 162 ;
      DVI_TT_MECHFORM = 163 ;
      DVI_TT_MECHTAB = 164 ;
      DVI_TT_MODEM = 165 ;
      DVI_TT_MODHANGUP = 166 ;
      DVI_TT_NOBRDCST = 167 ;
      DVI_TT_NOECHO = 168 ;
      DVI_TT_NOTYPEAHD = 169 ;
      DVI_TT_OPER = 170 ;
      DVI_TT_PAGE = 171 ;
      DVI_TT_PASTHRU = 172 ;
      DVI_TT_PHYDEVNAM = 173 ;
      DVI_TT_PRINTER = 174 ;
      DVI_TT_READSYNC = 175 ;
      DVI_TT_REGIS = 176 ;
      DVI_TT_REMOTE = 177 ;
      DVI_TT_SCOPE = 178 ;
      DVI_TT_SECURE = 179 ;
      DVI_TT_SETSPEED = 180 ;
      DVI_TT_SIXEL = 181 ;
      DVI_TT_SYSPWD = 182 ;
      DVI_TT_TTSYNC = 183 ;
      DVI_TT_WRAP = 184 ;
      DVI_UNIT = 185 ;
      DVI_VOLCHAR = 186 ;
      DVI_VOLCOUNT = 187 ;
      DVI_VOLNAM = 188 ;
      DVI_VOLNUMBER = 189 ;
      DVI_VOLSETMEM = 190 ;
      DVI_VOLSIZE = 191 ;
      DVI_VOLUME_EXTEND_QUANTITY = 192 ;
      DVI_VOLUME_MOUNT_GROUP = 193 ;
      DVI_VOLUME_MOUNT_SYS = 194 ;
      DVI_VOLUME_PENDING_WRITE_ERR = 195 ;
      DVI_VOLUME_RETAIN_MAX = 196 ;
      DVI_VOLUME_RETAIN_MIN = 197 ;
      DVI_VOLUME_SPOOLED_DEV_CBT = 198 ;
      DVI_VOLUME_WINDOW = 199 ;
      DVI_VPROT = 200 ;
      DVI_WRITETHRU_CACHE_ENABLED = 201 ;
      DVI_WWID = 202 ;

// Device characteristics...
const DEV_V_ALL = 1 ; // Device is allocated.
      DEV_V_AVL = 2 ; // Device is available for use.
      DEV_V_CCL = 4 ; // Device is a carriage control device.
      DEV_V_DIR = 8 ; // Device is directory structured.
      DEV_V_DMT = 16 ; // Device is marked for dismount.
      DEV_V_DUA = 32 ; // Device is dual ported.
      DEV_V_ELG = 64 ; // Device has error logging enabled.
      DEV_V_FOD = 128 ; // Device is files oriented.
      DEV_V_FOR = 256 ; // Device is mounted foreign.
      DEV_V_GEN = 512 ; // Device is a generic device.
      DEV_V_IDV = 1024 ; // Device can provide input.
      DEV_V_MBX = 2048 ; // Device is a mailbox.
      DEV_V_MNT = 4096 ; // Device is mounted.
      DEV_V_NET = 8192 ; // Device is a network device.
      DEV_V_ODV = 16384 ; // Device can provide output.
      DEV_V_OPR = 32768 ; // Device is an operator.
      DEV_V_RCK = $10000 ; // Device has read-checking enabled.
      DEV_V_RCT = $20000 ; // Disk contains Revector Cache Table (RCT). This bit is set for each DSA disk
      DEV_V_REC = $40000 ; // Device is record oriented.
      DEV_V_RND = $80000 ; // Device allows random access.
      DEV_V_RTM = $100000 ; // Device is a real-time device.
      DEV_V_SDI = $200000 ; // Device is single-directory structured.
      DEV_V_SHR = $400000 ; // Device is shareable.
      DEV_V_SQD = $800000 ; // Device is sequential and block oriented.
      DEV_V_SPL = $1000000 ; // Device is being spooled.
      DEV_V_SWL = $2000000 ; // Device is software write locked.
      DEV_V_TRM = $4000000 ; // Device is a terminal
      DEV_V_WCK = $8000000 ; // Device has write-checking enabled.

      DEV_V_CDP = $10000000 ; // Dual-pathed device with two UCBs.
      DEV_V_2P = $20000000 ; // Two paths are known to this device.
      DEV_V_MSCP = $40000000  ; // Device accessed using MSCP (disk or tape).
      DEV_V_SSM = $80000000 ; // Device is a shadow set member.
      DEV_V_SRV = $100000000 ; // Device is served by the MSCP server.
      DEV_V_RED = $200000000 ; // Device is redirected terminal.
      DEV_V_NNM = $400000000 ; // Device has node$ prefix.
      DEV_V_WBC = $800000000 ; // Device supports write-back caching.
      DEV_V_WTC = $1000000000 ; // Device supports write-through caching.
      DEV_V_HOC = $2000000000 ; // Device supports host caching.
      DEV_V_LOC = $4000000000 ; // Device accessible by local (non-emulated) controller.
      DEV_V_DFS = $8000000000 ; // Device is DFS-served.
      DEV_V_DAP = $10000000000 ; // Device is DAP accessed.
      DEV_V_NLT = $20000000000 ; // Device is not-last-track; that is, it has no bad block. Information is on its last track.
      DEV_V_SEX = $40000000000 ; // Device (tape) supports serious exception handling.
      DEV_V_SHD = $80000000000 ; // Device is a member of a host-based shadow set.
      DEV_V_VRT = $100000000000 ; // Device is a shadow set virtual unit.
      DEV_V_LDR = $200000000000 ; // Loader present (tapes).
      DEV_V_NOLB = $400000000000 ; // Device ignores server load balancing requests.
      DEV_V_NOCLU = $800000000000 ; // Device will never be available clusterwide.
      DEV_V_VMEM = $1000000000000 ; // Virtual member of a constituent set.
      DEV_V_SCSI = $2000000000000 ; // Device is a SCSI device.
      DEV_V_WLG = $4000000000000 ; // Device has write-logging capability.
      DEV_V_NOFE = $8000000000000 ; // Device does not support forced error.

      DEV_M_DET = $10000000000000 ; // Terminal is detached
      DEV_M_RTT = $20000000000000 ; // Terminal has remote terminal UCB extension.
We've also added a bunch more DVI_* constants in addition to the one we had before: DVI_DEVCLASS. Further, we've defined DEV_* constants for device characteristics. These essentially extend the HAL device flags.

Now that we've described the function from a user-perspective, and defined the new constants we are using, we're ready to consider the code that implements the F$GETDVI function (Parse_GetDVI). However, given the length of this article, we'll save that for the next article.

 

Copyright © 2020 by Alan Conroy. This article may be copied in whole or in part as long as this copyright is included.