home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21934 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  4.3 KB

  1. 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
  2. From: UDAA055@OAK.CC.KCL.AC.UK ("Andy, Systems Manager")
  3. Newsgroups: comp.os.vms
  4. Subject: RE: getting quota info (was: Lexicals)
  5. Message-ID: <9301252155.AA19091@ucbvax.Berkeley.EDU>
  6. Date: 25 Jan 93 11:57:00 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 124
  11.  
  12. Having seen a message about requiring quota information from a DCL program, I
  13. thought the following might be of general interest...
  14.  
  15. I wrote a short(ish) FORTRAN program to extract general disk quota information
  16. into DCL symbols. I designed it to be an easy to use replacement for the
  17. notoriously absent `f$getquo' lexical. Generally, the form of the command is:
  18.  
  19.    $ GETQUO [/qualifier=symbol] [username]
  20.  
  21. The qualifiers determine what info is returned and into which symbol. The
  22. username is optional and determines for whom quota info is required. The HELP
  23. file is included below so you can see if this utility meets your needs.
  24.  
  25. Anyone is welcome to a copy.  Please send an e-mail request to our server
  26. containing the command:
  27.  
  28.    SEND GETQUO.PACKAGE
  29.  
  30. in the body of the message. The server address is:
  31.  
  32.    VMSSERV @ UK.AC.KCL.CC.OAK   (JANET)
  33. or VMSSERV%UK.AC.KCL.CC.OAK @ NSFNET-RELAY.AC.UK  (Internet)
  34. or VMSSERV%UK.AC.KCL.CC.OAK @ UKACRL  (Bitnet)
  35.  
  36. Source and help is included, packaged in VMS_SHARE format.
  37.  
  38. If you have any suggestions for improvements, or bug reports, please let me
  39. know.
  40.  
  41. Regards,
  42.  
  43. Andy Harper
  44. Kings College London
  45.  
  46. 1 GETQUO
  47. Obtains disk quota information about a user and writes it into user
  48. specified DCL symbols.
  49.  
  50. Format:
  51.    $ GETQUO [/qual=symbol] [...]  [Username]
  52. 2 Errors
  53. Error returns from a number of system services can potentially be
  54. returned in the $STATUS symbol.
  55.  
  56. The only exception is the QFNOTACT status indicating that quotas are
  57. not active.  The status of this (TRUE or FALSE) can be returned to
  58. the user with the /ENABLED qualifier but the status is never
  59. signalled as an error.
  60.  
  61. The most common errors are these:
  62. 3 RNF
  63. %RMS-F-RNF, record not found
  64.  
  65. Indicates that a username was specified that is not valid on the
  66. system.
  67. 3 DEVNOTMOUNT
  68. %SYSTEM-E-DEVNOTMOUNT, Device not mounted
  69.  
  70. The user's default device has not been mounted and so the quota
  71. record cannot be read.
  72. 3 DEVOFFLINE
  73. %SYSTEM-E-DEVOFFLINE, Device off-line
  74.  
  75. The user's default device is off-line and so the quota record cannot
  76. be read.
  77. 2 Examples
  78.    $ GETQUO /USAGE=DISK_IN_USE
  79.         Obtains the disk quota usage information about the current
  80.         user and stores it in the local DCL symbol called
  81.         `DISK_IN_USE'.
  82.  
  83.    $ GETQUO SYSTEM /USAGE=USAGE /PERMANENT_QUOTA=PERM
  84.         Obtains the disk quota usage and permanent allocation
  85.         information for the user `SYSTEM' and stores it in the
  86.         symbols `USAGE' and `PERM'.
  87. 2 Operation
  88. The utility locates the default login device and UIC code for the
  89. specified user, then picks up the qualifier corresponding to this UIC
  90. on the device.  If quotas are not enabled, zero values are returned
  91. and the enabled flag is set to false (if specified - see the /ENABLED
  92. qualifier).
  93.  
  94. Privileges (SYSPRV or SYSNAM) are required to see the quotas for
  95. another user.
  96.  
  97. This version of the utility will not return values for arbitrary UIC
  98. codes on arbitrary volumes. This will be included in a future
  99. enhancement.
  100. 2 Parameters
  101. The single parameter specifies the user for whom disk quota
  102. information is required.  It defaults to the current user.
  103.  
  104. Privileges (SYSPRV or SYSNAM) are required to see the quotas for
  105. another user.
  106. 2 Qualifiers
  107. /DEVICE
  108.   /DEVICE=symbol
  109.  
  110.   Returns the user's default device in the specified symbol.  This is
  111.   the device selected at initial login.
  112. /ENABLED
  113.   /ENABLED=symbol
  114.  
  115.   Returns the string "TRUE" or "FALSE" in the specified symbol,
  116.   depending on whether quotas are enabled on the volume. Note that, if
  117.   quotas are not enabled, any quota value requested by other
  118.   qualifiers will be returned as 0.
  119. /OVERDRAFT
  120.   /OVERDRAFT=symbol
  121.  
  122.   Returns the user's overdraft limit in the specified symbol.
  123. /PERMANENT_QUOTA
  124.   /PERMANENT_QUOTA=symbol
  125.  
  126.   Returns the user's permanent quota limit in the specified symbol.
  127. /UIC
  128.   /UIC=symbol
  129.  
  130.   Returns the user's default UIC code in the specified symbol.
  131. /USAGE
  132.   /USAGE=symbol
  133.  
  134.   Returns the user's current disk usage in the specified symbol.
  135.  
  136.