From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  1-DEC-1989 04:46
To:	MRGATE::"ARISIA::EVERHART"
Subj:	DISKQUOTA shell for SYSMAN DISKQUOTA

Received: From UCBVAX.BERKELEY.EDU by GIZMO.SRI.COM with TCP; Fri,  1 DEC 89 00:38:13 PDT
Received: by ucbvax.Berkeley.EDU (5.61/1.40)
	id AA05646; Fri, 1 Dec 89 00:34:33 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 30 Nov 89 21:23:44 GMT
From: dac!gavron@lanl.gov  (Ehud Gavron, system manager and VMS guru)
Organization: LAMPF Data Analysis Center, Los Alamos New Mexico
Subject: DISKQUOTA shell for SYSMAN DISKQUOTA
Message-Id: <1322.25759a60@mpx1.lanl.gov>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com


	We use disk quotas extensively to control users on our
	disks.  Having been used to DISKQUOTA's    USE diskname
	command (where every subsequent command would then
	reference that disk) I was a bit disappointed that SYSMAN's
	DISKQUOTA requires a   /DEV=diskname  for each command.

	Included below is a DCL shell to make the SYSMAN diskquota
	behave like the old DISKQUOTA utility (with the addition
	of the quit command).

	Enjoy.
-- 
------------------------------------------------------------------
| Ehud Gavron, System Manager     gavron@mpx{0|1}.lanl.gov (inet)|
| Los Alamos National Laboratory  gavron@lampf        (bitnet)   |
| Meson Physics Division DAC      cmcl2!lanl!eg       (uucp)     |
| (505)665-1131/667-9288          1029::55295::GAVRON (SPAN)     |
------------------------------------------------------------------

$-------------cut here for beginning----------------------------------
$! Diskquota shell v1.0 gavron@mpx1.lanl.gov Ehud Gavron 30-Nov-1989
$!
$ curdisk = f$trnlnm("SYS$DISK")
$ set noon
$ diskq =="$sysman diskq "
$top:
$ on error then goto top
$ on warning then goto top
$ on control_y then goto qui
$ inquire/nopunct cmd "Sysman DISKQ> "
$ u = f$edit(cmd,"upcase,trim,compress")+"   "
$ e1=f$element(0," ",u)
$ e2=f$element(1," ",u)
$ f1=f$extract(0,3,e1)
$ if e1 .eqs. "?" then f1 = help
$ if 	(f1 .nes. "ADD") .and. -
	(f1 .nes. "CRE") .and. -
	(f1 .nes. "DIS") .and. -
	(f1 .nes. "ENA") .and. -
	(f1 .nes. "EXI") .and. -
	(f1 .nes. "HEL") .and. -
	(f1 .nes. "MOD") .and. -
	(f1 .nes. "QUI") .and. -
	(f1 .nes. "REB") .and. -
	(f1 .nes. "REM") .and. -
	(f1 .nes. "SHO") .and. -
	(f1 .nes. "USE") then goto invcmd
$ goto 'f1'
$!
$invcmd:
$ write sys$output "%DISKQ-F-INVCMD, Invalid command entered."
$ goto top
$add:
$cre:
$dis:
$ena:
$mod:
$reb:
$rem:
$sho:
$  diskq 'cmd' /dev='curdisk'
$ goto top
$exi:
$qui:
$ stop
$help:
$ define/user sys$input "''f$trnlnm("sys$command")'"
$ help sysman diskquota
$ goto top
$use:
$ if f$getdvi(e2,"exists") then goto setit
$ write sys$output "DISKQ-F-INVDEV, Invalid device ''e2'."
$ goto top
$setit:
$ curdisk = e2
$ goto top
$---------------cut here for ending----------------------------------------

