Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* nifty DCL to aid in mounting CD disk volumes
@ 1992-02-13 19:38 brodie
  0 siblings, 0 replies; only message in thread
From: brodie @ 1992-02-13 19:38 UTC (permalink / raw)


I wrote the following little utility to help me better mount my
CD disks on my infoserver.   It lets me mount the disks without
knowing the volume label.  (MOUNT/SYSTEM/OVERRIDE=ID does not work
on read-only disks.   sigh.)

Anyway, this is handy for folks with con_dist and online_doc, 'cause
you don't have to remember silly labels like CDDOC02JAN21 etc.

I've also included some rudimentary error checking (make sure
logical device exists, make sure physical device available, also
check to see if already mounted, etc.)

Assumptions:

1) The service has been created in the infoserver (for example,
   ONLINE_DOC)
2) Via LADCP, that the service has been bound with /SYSTEM.

Typical usage in systartup_v5.com, for example:

$ @sys$startup:ess$startup CLIENT
$ run sys$system:ess$ladcp
BIND/SYSTEM ONLINE_DOC
BIND/SYSTEM CON_DIST
EXIT
$ @sys$manager:mount_dad dad$con_dist
$ @sys$manager:mount_dad dad$online_doc

Enjoy.
----------------------------------------------------------------
$! Mount a DAD (Infoserver) disk without knowing its label.
$! Needed because  $mount/system/override=ID on a CD disk does not work.
$! By:  Kent C. Brodie, Medical College of Wisconsin.   brodie@fps.mcw.edu
$!
$! Input:  P1 = Logical name of disk device.  (usually DAD$servicename)
$!         This procedure needs the service bound previously
$! Output: None
$! Side Effects:  DAD disk will be mounted /SYSTEM
$!--------------------------------------------------------------
$ temp1 = "sys$scratch:zzztemp.label1"
$ temp2 = "sys$scratch:zzztemp.label2"
$ set NOON
$ If p1 .eqs. "" 
$ then
$  inquire/nopunct disk_name "Disk device to mount: "
$ else
$  disk_name = p1
$ endif
$ if f$trnlnm(disk_name) .eqs. "" 
$  then
$    write sys$output "Logical device ''disk_name' does not appear to exist."
$    exit
$  endif
$ if .not. f$getdvi("''disk_name'","AVL")
$  then
$    write sys$output "Physical device ''disk_name' is not available."
$    exit
$  endif
$ if f$getdvi("''disk_name'","MNT")
$  then
$    write sys$output "Disk ''disk_name' is already mounted."
$    exit
$  endif
$ assign 'temp1 sys$output
$ assign 'temp2 sys$error
$ mount/noassist 'disk_name WRONGLABEL
$ deassign sys$output
$ deass sys$error
$ open/read dataf 'temp1
$ read dataf line
$ read dataf line
$ close dataf
$ delete/nolog 'temp1;0
$ delete/nolog 'temp2;0
$ disk_volume_label = f$element(1,"'",line)
$ write sys$output disk_volume_label
$ on error then $exit
$ mount/system/noassist 'disk_name 'disk_volume_label
$ exit
---------------------------------------------------------------

-- 
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

"Researchers have shown that people who drink four or more cups of
 coffee a day are 40% more prone to heart attacks.... I guess we all
 now know what happened to *MISTER* Olson...."  -Jay Leno


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-02-13 19:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-02-13 19:38 nifty DCL to aid in mounting CD disk volumes brodie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox