Previous Page | Next Page

Functions and CALL Routines under OpenVMS

GETQUOTA Function: OpenVMS



Retrieves disk quota information.
Category: General-Purpose OpenVMS
OpenVMS specifics: All aspects are host-specific

Syntax
Details
Example
See Also

Syntax

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

dev

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

user

receives your numeric 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.

chan

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:   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;
  chan=0
  do until (rc ^= 1);
   rc=getquota(dev,user,usage,perm,over,context,chan);
   output;
  end;
run;

proc print data=gquota;
run;


See Also

Previous Page | Next Page | Top of Page