From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,579a1611cbb90a40,start X-Google-Attributes: gidf7344,public X-Google-Thread: f86d6,579a1611cbb90a40,start X-Google-Attributes: gidf86d6,public X-Google-Thread: 1164f8,579a1611cbb90a40,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-02-13 13:02:34 PST Xref: sparky comp.os.vms:5826 comp.sys.dec:1537 vmsnet.sysmgt:96 Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!fps.mcw.edu!brodie From: brodie@fps.mcw.edu Newsgroups: comp.os.vms,comp.sys.dec,vmsnet.sysmgt Subject: nifty DCL to aid in mounting CD disk volumes Message-ID: <1992Feb13.133851.522@fps.mcw.edu> Date: 13 Feb 92 13:38:51 CST Organization: Medical College of Wisconsin, Milwaukee, WI 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