From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 24-JUN-1992 00:21:11.28
To:	info-vax@kl.sri.com
CC:	
Subj:	*EVERYTHING* you want about a device (from dcl)

The other day someone asked if there was a DCL function to get DENSITY
from a tape device.   I know of no such function.  However, I did
decide that at the same rate, I was quite tired of playing around with
the hundreds of F$GETDVI choices to see if it had what I was looking
for....

So, I did something that's a little dcl hack, but hey, it's kinda useful.

What I did was take the ENTIRE "item" list from the DCL HELP library
for the F$GETDVI function, and write a little dcl to tell
you EVERYTHING you ever wanted to know about a device.    

The next generation of this utility, of course, would be to
not only show the user WHAT the value of the chartacteristic
was, but what it actually means.  (for example, instead of
writing "VPROT = ", we would write  "Volume Protection: "

I'll leave that as an excercise for someone who has more time
than I do.

Anyway, some of you might find this as a timesaver....


---------------cut here---------------------------
$! GETCHAR.COM	Get ALL dcl lexical info about any device.
$ device = p1
$ if p1 .eqs. ""
$ then
$  write sys$output "Usage:    @getchar DEVICE-NAME  "
$  exit
$ endif
$ write sys$output " ACPPID = ",f$getdvi("''device'"," ACPPID ")
$ write sys$output " ACPTYPE = ",f$getdvi("''device'"," ACPTYPE ")
$ write sys$output " ALL = ",f$getdvi("''device'"," ALL ")
$ write sys$output " ALLDEVNAM = ",f$getdvi("''device'"," ALLDEVNAM ")
$ write sys$output " ALLOCLASS= ",f$getdvi("''device'"," ALLOCLASS")
$ write sys$output " ALT_HOST_AVAIL = ",f$getdvi("''device'"," ALT_HOST_AVAIL ")
$ write sys$output " ALT_HOST_NAME = ",f$getdvi("''device'"," ALT_HOST_NAME ")
$ write sys$output " ALT_HOST_TYPE = ",f$getdvi("''device'"," ALT_HOST_TYPE ")
$ write sys$output " AVL = ",f$getdvi("''device'"," AVL ")
$ write sys$output " CCL= ",f$getdvi("''device'"," CCL")
$ write sys$output " CLUSTER = ",f$getdvi("''device'"," CLUSTER ")
$ write sys$output " CONCEALED = ",f$getdvi("''device'"," CONCEALED ")
$ write sys$output " CYLINDERS = ",f$getdvi("''device'"," CYLINDERS ")
$ write sys$output " DEVBUFSIZ = ",f$getdvi("''device'"," DEVBUFSIZ ")
$ write sys$output " DEVCHAR= ",f$getdvi("''device'"," DEVCHAR")
$ write sys$output " DEVCHAR2 = ",f$getdvi("''device'"," DEVCHAR2 ")
$ write sys$output " DEVCLASS = ",f$getdvi("''device'"," DEVCLASS ")
$ write sys$output " DEVDEPEND = ",f$getdvi("''device'"," DEVDEPEND ")
$ write sys$output " DEVDEPEND2 = ",f$getdvi("''device'"," DEVDEPEND2 ")
$ write sys$output " DEVLOCKNAM= ",f$getdvi("''device'"," DEVLOCKNAM")
$ write sys$output " DEVNAM = ",f$getdvi("''device'"," DEVNAM ")
$ write sys$output " DEVSTS = ",f$getdvi("''device'"," DEVSTS ")
$ write sys$output " DEVTYPE = ",f$getdvi("''device'"," DEVTYPE ")
$ write sys$output " DFS_ACCESS = ",f$getdvi("''device'"," DFS_ACCESS ")
$ write sys$output " DIR= ",f$getdvi("''device'"," DIR")
$ write sys$output " DMT = ",f$getdvi("''device'"," DMT ")
$ write sys$output " DUA = ",f$getdvi("''device'"," DUA ")
$ write sys$output " ELG = ",f$getdvi("''device'"," ELG ")
$ write sys$output " ERRCNT = ",f$getdvi("''device'"," ERRCNT ")
$ write sys$output " EXISTS= ",f$getdvi("''device'"," EXISTS")
$ write sys$output " FOD = ",f$getdvi("''device'"," FOD ")
$ write sys$output " FOR = ",f$getdvi("''device'"," FOR ")
$ write sys$output " FREEBLOCKS = ",f$getdvi("''device'"," FREEBLOCKS ")
$ write sys$output " FULLDEVNAM = ",f$getdvi("''device'"," FULLDEVNAM ")
$ write sys$output " GEN= ",f$getdvi("''device'"," GEN")
$ write sys$output " HOST_AVAIL = ",f$getdvi("''device'"," HOST_AVAIL ")
$ write sys$output " HOST_COUNT = ",f$getdvi("''device'"," HOST_COUNT ")
$ write sys$output " HOST_NAME = ",f$getdvi("''device'"," HOST_NAME ")
$ write sys$output " HOST_TYPE = ",f$getdvi("''device'"," HOST_TYPE ")
$ write sys$output " IDV= ",f$getdvi("''device'"," IDV")
$ write sys$output " LOCKID = ",f$getdvi("''device'"," LOCKID ")
$ write sys$output " LOGVOLNAM = ",f$getdvi("''device'"," LOGVOLNAM ")
$ write sys$output " MAXBLOCK = ",f$getdvi("''device'"," MAXBLOCK ")
$ write sys$output " MAXFILES = ",f$getdvi("''device'"," MAXFILES ")
$ write sys$output " MBX= ",f$getdvi("''device'"," MBX")
$ write sys$output " MEDIA_ID = ",f$getdvi("''device'"," MEDIA_ID ")
$ write sys$output " MEDIA_NAME = ",f$getdvi("''device'"," MEDIA_NAME ")
$ write sys$output " MEDIA_TYPE = ",f$getdvi("''device'"," MEDIA_TYPE ")
$ write sys$output " MNT = ",f$getdvi("''device'"," MNT ")
$ write sys$output " MOUNTCNT= ",f$getdvi("''device'"," MOUNTCNT")
$ write sys$output " NET = ",f$getdvi("''device'"," NET ")
$ write sys$output " NEXTDEVNAM = ",f$getdvi("''device'"," NEXTDEVNAM ")
$ write sys$output " ODV = ",f$getdvi("''device'"," ODV ")
$ write sys$output " OPCNT = ",f$getdvi("''device'"," OPCNT ")
$ write sys$output " OPR= ",f$getdvi("''device'"," OPR")
$ write sys$output " OWNUIC = ",f$getdvi("''device'"," OWNUIC ")
$ write sys$output " PID = ",f$getdvi("''device'"," PID ")
$ write sys$output " RCK = ",f$getdvi("''device'"," RCK ")
$ write sys$output " RCT = ",f$getdvi("''device'"," RCT ")
$ write sys$output " REC= ",f$getdvi("''device'"," REC")
$ write sys$output " RECSIZ = ",f$getdvi("''device'"," RECSIZ ")
$ write sys$output " REFCNT = ",f$getdvi("''device'"," REFCNT ")
$ write sys$output " REMOTE_DEVICE = ",f$getdvi("''device'"," REMOTE_DEVICE ")
$ write sys$output " RND = ",f$getdvi("''device'"," RND ")
$ write sys$output " ROOTDEVNAM= ",f$getdvi("''device'"," ROOTDEVNAM")
$ write sys$output " RTM = ",f$getdvi("''device'"," RTM ")
$ write sys$output " SDI = ",f$getdvi("''device'"," SDI ")
$ write sys$output " SECTORS = ",f$getdvi("''device'"," SECTORS ")
$ write sys$output " SERIALNUM = ",f$getdvi("''device'"," SERIALNUM ")
$ write sys$output " SERVED_DEVICE= ",f$getdvi("''device'"," SERVED_DEVICE")
$ write sys$output " SET_HOST_TERMINAL = ",f$getdvi("''device'"," SET_HOST_TERMINAL ")
$ write sys$output " SHDW_CATCHUP_COPYING= ",f$getdvi("''device'"," SHDW_CATCHUP_COPYING")
$ write sys$output " SHDW_FAILED_MEMBER = ",f$getdvi("''device'"," SHDW_FAILED_MEMBER ")
$ write sys$output " SHDW_MASTER = ",f$getdvi("''device'"," SHDW_MASTER ")
$ write sys$output " SHDW_MASTER_NAME= ",f$getdvi("''device'"," SHDW_MASTER_NAME")
$ write sys$output " SHDW_MEMBER = ",f$getdvi("''device'"," SHDW_MEMBER ")
$ write sys$output " SHDW_MERGE_COPYING = ",f$getdvi("''device'"," SHDW_MERGE_COPYING ")
$ write sys$output " SHDW_NEXT_MBR_NAME= ",f$getdvi("''device'"," SHDW_NEXT_MBR_NAME")
$ write sys$output " SHR = ",f$getdvi("''device'"," SHR ")
$ write sys$output " SPL = ",f$getdvi("''device'"," SPL ")
$ write sys$output " SPLDEVNAM = ",f$getdvi("''device'"," SPLDEVNAM ")
$ write sys$output " SQD = ",f$getdvi("''device'"," SQD ")
$ write sys$output " STS = ",f$getdvi("''device'"," STS ")
$ write sys$output " SWL= ",f$getdvi("''device'"," SWL")
$ write sys$output " TRACKS = ",f$getdvi("''device'"," TRACKS ")
$ write sys$output " TRANSCNT = ",f$getdvi("''device'"," TRANSCNT ")
$ write sys$output " TRM = ",f$getdvi("''device'"," TRM ")
$ write sys$output " TT_ACCPORNAM = ",f$getdvi("''device'"," TT_ACCPORNAM ")
$ write sys$output " TT_ALTYPEAHD= ",f$getdvi("''device'"," TT_ALTYPEAHD")
$ write sys$output " TT_ANSICRT = ",f$getdvi("''device'"," TT_ANSICRT ")
$ write sys$output " TT_APP_KEYPAD = ",f$getdvi("''device'"," TT_APP_KEYPAD ")
$ write sys$output " TT_AUTOBAUD = ",f$getdvi("''device'"," TT_AUTOBAUD ")
$ write sys$output " TT_AVO = ",f$getdvi("''device'"," TT_AVO ")
$ write sys$output " TT_BLOCK= ",f$getdvi("''device'"," TT_BLOCK")
$ write sys$output " TT_BRDCSTMBX = ",f$getdvi("''device'"," TT_BRDCSTMBX ")
$ write sys$output " TT_CRFILL = ",f$getdvi("''device'"," TT_CRFILL ")
$ write sys$output " TT_DECCRT = ",f$getdvi("''device'"," TT_DECCRT ")
$ write sys$output " TT_DECCRT2 = ",f$getdvi("''device'"," TT_DECCRT2 ")
$ write sys$output " TT_DECCRT3= ",f$getdvi("''device'"," TT_DECCRT3")
$ write sys$output " TT_DECCRT4 = ",f$getdvi("''device'"," TT_DECCRT4 ")
$ write sys$output " TT_DIALUP = ",f$getdvi("''device'"," TT_DIALUP ")
$ write sys$output " TT_DISCONNECT = ",f$getdvi("''device'"," TT_DISCONNECT ")
$ write sys$output " TT_DMA = ",f$getdvi("''device'"," TT_DMA ")
$ write sys$output " TT_DRCS= ",f$getdvi("''device'"," TT_DRCS")
$ write sys$output " TT_EDIT = ",f$getdvi("''device'"," TT_EDIT ")
$ write sys$output " TT_EDITING = ",f$getdvi("''device'"," TT_EDITING ")
$ write sys$output " TT_EIGHTBIT = ",f$getdvi("''device'"," TT_EIGHTBIT ")
$ write sys$output " TT_ESCAPE = ",f$getdvi("''device'"," TT_ESCAPE ")
$ write sys$output " TT_FALLBACK= ",f$getdvi("''device'"," TT_FALLBACK")
$ write sys$output " TT_HALFDUP = ",f$getdvi("''device'"," TT_HALFDUP ")
$ write sys$output " TT_HANGUP = ",f$getdvi("''device'"," TT_HANGUP ")
$ write sys$output " TT_HOSTSYNC = ",f$getdvi("''device'"," TT_HOSTSYNC ")
$ write sys$output " TT_INSERT = ",f$getdvi("''device'"," TT_INSERT ")
$ write sys$output " TT_LFFILL= ",f$getdvi("''device'"," TT_LFFILL")
$ write sys$output " TT_LOCALECHO = ",f$getdvi("''device'"," TT_LOCALECHO ")
$ write sys$output " TT_LOWER = ",f$getdvi("''device'"," TT_LOWER ")
$ write sys$output " TT_MBXDSABL = ",f$getdvi("''device'"," TT_MBXDSABL ")
$ write sys$output " TT_MECHFORM = ",f$getdvi("''device'"," TT_MECHFORM ")
$ write sys$output " TT_MECHTAB= ",f$getdvi("''device'"," TT_MECHTAB")
$ write sys$output " TT_MODEM = ",f$getdvi("''device'"," TT_MODEM ")
$ write sys$output " TT_MODHANGUP = ",f$getdvi("''device'"," TT_MODHANGUP ")
$ write sys$output " TT_NOBRDCST = ",f$getdvi("''device'"," TT_NOBRDCST ")
$ write sys$output " TT_NOECHO = ",f$getdvi("''device'"," TT_NOECHO ")
$ write sys$output " TT_NOTYPEAHD= ",f$getdvi("''device'"," TT_NOTYPEAHD")
$ write sys$output " TT_OPER = ",f$getdvi("''device'"," TT_OPER ")
$ write sys$output " TT_PAGE = ",f$getdvi("''device'"," TT_PAGE ")
$ write sys$output " TT_PASTHRU = ",f$getdvi("''device'"," TT_PASTHRU ")
$ write sys$output " TT_PHYDEVNAM = ",f$getdvi("''device'"," TT_PHYDEVNAM ")
$ write sys$output " TT_PRINTER= ",f$getdvi("''device'"," TT_PRINTER")
$ write sys$output " TT_READSYNC = ",f$getdvi("''device'"," TT_READSYNC ")
$ write sys$output " TT_REGIS = ",f$getdvi("''device'"," TT_REGIS ")
$ write sys$output " TT_REMOTE = ",f$getdvi("''device'"," TT_REMOTE ")
$ write sys$output " TT_SCOPE = ",f$getdvi("''device'"," TT_SCOPE ")
$ write sys$output " TT_SECURE= ",f$getdvi("''device'"," TT_SECURE")
$ write sys$output " TT_SETSPEED = ",f$getdvi("''device'"," TT_SETSPEED ")
$ write sys$output " TT_SIXEL = ",f$getdvi("''device'"," TT_SIXEL ")
$ write sys$output " TT_SYSPWD = ",f$getdvi("''device'"," TT_SYSPWD ")
$ write sys$output " TT_TTSYNC = ",f$getdvi("''device'"," TT_TTSYNC ")
$ write sys$output " TT_WRAP= ",f$getdvi("''device'"," TT_WRAP")
$ write sys$output " UNIT = ",f$getdvi("''device'"," UNIT ")
$ write sys$output " VOLCOUNT = ",f$getdvi("''device'"," VOLCOUNT ")
$ write sys$output " VOLNAM = ",f$getdvi("''device'"," VOLNAM ")
$ write sys$output " VOLNUMBER = ",f$getdvi("''device'"," VOLNUMBER ")
$ write sys$output " VOLSETMEM= ",f$getdvi("''device'"," VOLSETMEM")
$ write sys$output " VPRO = ",f$getdvi("''device'"," VPROT ")
$ write sys$output " WCK= ",f$getdvi("''device'"," WCK")
$ exit


enjoy....
-- 
Kent C. Brodie - Sr. Systems Manager		InterNet:  brodie@fps.mcw.edu
Faculty Physicians & Surgeons			uucpNet:   fps.mcw.edu!brodie
Medical College of Wisconsin			MaBellNet: +1 414 266 5080

"Little bunny FOO-FOO, walkin' through the forest,
   scoopin' all the field mice and boppin' 'em on the head.."  -childrens song

