home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!uwm.edu!spool.mu.edu!agate!ucbvax!OAK.CC.KCL.AC.UK!UDAA055
- From: UDAA055@OAK.CC.KCL.AC.UK ("Andy, Systems Manager")
- Newsgroups: comp.os.vms
- Subject: RE: getting quota info (was: Lexicals)
- Message-ID: <9301252155.AA19091@ucbvax.Berkeley.EDU>
- Date: 25 Jan 93 11:57:00 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 124
-
- Having seen a message about requiring quota information from a DCL program, I
- thought the following might be of general interest...
-
- I wrote a short(ish) FORTRAN program to extract general disk quota information
- into DCL symbols. I designed it to be an easy to use replacement for the
- notoriously absent `f$getquo' lexical. Generally, the form of the command is:
-
- $ GETQUO [/qualifier=symbol] [username]
-
- The qualifiers determine what info is returned and into which symbol. The
- username is optional and determines for whom quota info is required. The HELP
- file is included below so you can see if this utility meets your needs.
-
- Anyone is welcome to a copy. Please send an e-mail request to our server
- containing the command:
-
- SEND GETQUO.PACKAGE
-
- in the body of the message. The server address is:
-
- VMSSERV @ UK.AC.KCL.CC.OAK (JANET)
- or VMSSERV%UK.AC.KCL.CC.OAK @ NSFNET-RELAY.AC.UK (Internet)
- or VMSSERV%UK.AC.KCL.CC.OAK @ UKACRL (Bitnet)
-
- Source and help is included, packaged in VMS_SHARE format.
-
- If you have any suggestions for improvements, or bug reports, please let me
- know.
-
- Regards,
-
- Andy Harper
- Kings College London
-
- 1 GETQUO
- Obtains disk quota information about a user and writes it into user
- specified DCL symbols.
-
- Format:
- $ GETQUO [/qual=symbol] [...] [Username]
- 2 Errors
- Error returns from a number of system services can potentially be
- returned in the $STATUS symbol.
-
- The only exception is the QFNOTACT status indicating that quotas are
- not active. The status of this (TRUE or FALSE) can be returned to
- the user with the /ENABLED qualifier but the status is never
- signalled as an error.
-
- The most common errors are these:
- 3 RNF
- %RMS-F-RNF, record not found
-
- Indicates that a username was specified that is not valid on the
- system.
- 3 DEVNOTMOUNT
- %SYSTEM-E-DEVNOTMOUNT, Device not mounted
-
- The user's default device has not been mounted and so the quota
- record cannot be read.
- 3 DEVOFFLINE
- %SYSTEM-E-DEVOFFLINE, Device off-line
-
- The user's default device is off-line and so the quota record cannot
- be read.
- 2 Examples
- $ GETQUO /USAGE=DISK_IN_USE
- Obtains the disk quota usage information about the current
- user and stores it in the local DCL symbol called
- `DISK_IN_USE'.
-
- $ GETQUO SYSTEM /USAGE=USAGE /PERMANENT_QUOTA=PERM
- Obtains the disk quota usage and permanent allocation
- information for the user `SYSTEM' and stores it in the
- symbols `USAGE' and `PERM'.
- 2 Operation
- The utility locates the default login device and UIC code for the
- specified user, then picks up the qualifier corresponding to this UIC
- on the device. If quotas are not enabled, zero values are returned
- and the enabled flag is set to false (if specified - see the /ENABLED
- qualifier).
-
- Privileges (SYSPRV or SYSNAM) are required to see the quotas for
- another user.
-
- This version of the utility will not return values for arbitrary UIC
- codes on arbitrary volumes. This will be included in a future
- enhancement.
- 2 Parameters
- The single parameter specifies the user for whom disk quota
- information is required. It defaults to the current user.
-
- Privileges (SYSPRV or SYSNAM) are required to see the quotas for
- another user.
- 2 Qualifiers
- /DEVICE
- /DEVICE=symbol
-
- Returns the user's default device in the specified symbol. This is
- the device selected at initial login.
- /ENABLED
- /ENABLED=symbol
-
- Returns the string "TRUE" or "FALSE" in the specified symbol,
- depending on whether quotas are enabled on the volume. Note that, if
- quotas are not enabled, any quota value requested by other
- qualifiers will be returned as 0.
- /OVERDRAFT
- /OVERDRAFT=symbol
-
- Returns the user's overdraft limit in the specified symbol.
- /PERMANENT_QUOTA
- /PERMANENT_QUOTA=symbol
-
- Returns the user's permanent quota limit in the specified symbol.
- /UIC
- /UIC=symbol
-
- Returns the user's default UIC code in the specified symbol.
- /USAGE
- /USAGE=symbol
-
- Returns the user's current disk usage in the specified symbol.
-
-