0.9b (c) 1995 Peter Childs
The function invokes the directory limit function, placing a limit on the amount of disk space that can be used within a directory tree. Before this function can be invoked, directory limits must be enabled on the 386-HPFS drive. (See the NetMisc(NETDASDCONTROL) function)
Syntax
MyRc = NetAdd(NETDASD, 'DASDInfo', SrvName)
Parameters
The parameters required and returned are:
'DASDInfo' The directory limits information variable, which is divided into:
o DASDInfo.resource_name
The name of the directory to add directory limit on. The parameter is the directory name, beginning with the drive letter and ending without the backslash (\). The path specified can be on a redirected drive. In this case, the SrvName parameter must be ''
o DASDInfo.max
The amount of disk space allotted to this directory by directory limits. Specified in KB, this field can be set from 1 to 67108863. Note however, that subsequent access to the directory specified is functionally limited to the smaller of the following:
1. Any directory limits restrictions on any parent directory
2. The total free space on the drive
o DASDInfo.flag
A flag controlling the operations when a directory limit added The following values are valid:
Value Meaning ----- ------- 0 Compares a newly specified limit to the amount of disk space already taken by the directory. If the directory tree size exceeds the new limit, NERR_MaxValidationFailed (2304) is returned 1 Sets the new limit regardless of the present size of the directory tree
The default is 0
o DASDInfo.thresh
The initial alert threshold as a percentage of the total directory limit space allotted, with values ranging from 0 to 99. Zero specifies that no threshold alert is to be generated, and 99 specifies that an alert is generated when 99% of the allotted directory limit for this directory has been reached. Note that a minimum of 1KB of disk space must be allotted to a threshold; the value obtained by multiplying the DASDInfo.thresh decimal-point value (where 5% is equal to 0.05) by DASDInfo.max must be at least 1KB.
This threshold setting generates only 1 alert when this boundary is crossed. Subsequent alerts (generated incrementally after this threshold has been reached but before the entire limit is reached) are specified according to the DASDInfo.delta parameter
The default value is 0
o DASDInfo.delta
The increment in which alerts are to be generated after the DASDInfo.thresh threshold has been crossed, but before all of the allotted disk space has been used. This parameter also is specified as a percentage of the total allotted directory limit space and can range from 0 upward, as long as its value is less than 99 - DASDInfo.thresh.
Note that a minimum of 1KB of disk space must be allotted to an increment; the value obtained by multiplying the DASDInfo.delta decimal-point value (where 5% is equal to 0.05) by DASDInfo.max must be at least 1KB
SrvName The computer name of the server to perform the directory limit add operation on
Note
The server computer name can be specified as '' for a local server.
Example
/* Add DASD directory limits on server */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETDASD = 750 DASDInfo.resource_name = 'D:\APPS\DATA' DASDInfo.max = 512 DASDInfo.flag = 0 DASDInfo.thresh = 90 DASDInfo.delta = 5 SrvName = '\\DOMAIN_CONTRLR' myRc = NetAdd(NETDASD, 'DASDInfo', SrvName) if myRc <> '0' then do say 'Got error from NetAdd() ' myRc exitRc = 9 end else do say 'Directory limit successfully added' exitRc = 0 end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit exitRc
Example Output
Directory limit successfully added
Inf-HTML End Run - Successful