IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NETDASD Set Info (LS40)


The function modifies a directory limit parameter.   
Syntax 

MyRc = NetSetInfo(NETDASD, 'PARAMETER', parmValue, SrvName, DirPath, Flag)

  
Parameters 
The parameters required are: 
'PARAMETER'   The parameter name of the directory limit value to be 
              modified. The parameter values that causes a change of the 
              directory limit definitions are specified below. Only one 
              parameter value can be changed at a time. If the parameter 
              is invalid or the parameter value is unknown or in error no 
              changes will occour. 
   o 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 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 
   o 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 
parmValue     The value of the parameter that is being modified 
SrvName       The server computer name 
DirPath       The directory path specification 
Flag          A flag controlling the operations when a directory limit is 
              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
              
              
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Set new DASD directory limit maximum size */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETDASD             = 750
parameter           = 'max'
parmValue           = 512
SrvName             = '\\DOMAIN_CONTRLR'
DirPath             = 'D:\APPS\DATA'
Flag                = 1

myRc = NetSetInfo(NETDASD, parameter, parmValue, SrvName, DirPath, Flag)

if myRc <> '0' then do
 say 'Got error from NetSetInfo() ' myRc
 exitRc = 9
end
else do
 say 'Directory Limit set successfully'
 exitRc = 0
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit exitRc

  
Example Output   

Directory Limit set successfully



Inf-HTML End Run - Successful