Chapter Contents

Previous

Next
GETQUOTA

GETQUOTA



Retrieves disk quota information

Language element: function
Category: general-purpose OpenVMS
OpenVMS specifics: All aspects are host-specific


Syntax
Details
Example
See Also

Syntax

GETQUOTA(dev,user,usage,perm,over,context)

dev
is the device that you want to gather disk quota information for.

user
receives your numeric user identification code (UIC) on the disk. The UICw. format can be used to format the numeric value. This variable must be initialized to 0 before the first execution.

usage
receives your current disk usage in blocks. This variable must be initialized to 0 before the first execution.

perm
receives your permanent quota. This variable must be initialized to 0 before the first execution.

over
receives your allowed overdraft. This variable must be initialized to 0 before the first execution.

context
is a numeric variable that must be initialized to 0 before the first execution and must not be modified between calls.


Details

Besides storing the quota information in the USER, USAGE, PERM, and OVER variables, the GETQUOTA function also returns the OpenVMS status code that is returned by SYS$QIO. The OpenVMS status code can have the following return codes:
1 indicates the GETQUOTA function was successful and more disk quota remains.
996 indicates that no more quota information is available.
980 indicates that quotas are not enabled on the volume.
Any other value indicates an OpenVMS error.

Note:   In order to use the GETQUOTA function, you must have either SYSPRV privileges or read access to QUOTA.SYS on the volume.  [cautionend]


Example

The following example uses the GETQUOTA function:

data gquota;
  dev="$1$DUA0:";
  user=0;
  usage=0;
  perm=0;
  over=0;
  context=0;
  do until (rc ^= 1);
   rc=getquota(dev,user,usage,perm,over,context);
   output;
  end;
run;

proc print data=gquota;
run;

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.