IBM OS/2 LAN Server REXX Utility DLL


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


NetMisc(NETDASDCHECK) (LS40)


The function returns the amount of disk space available and the amount 
already taken in a specified directory tree. Before this function can be 
invoked successfully, directory limits must be enabled on the 386-HPFS 
drive. (See the NetMisc(NETDASDCONTROL) function)   
Syntax 


MyRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)

  
Parameters 
The parameters required and returned are: 
'DASDInfo'  The directory limits information variable, which is divided 
            into: 
   o DASDInfo.DirPath 
     The directory path to check. If a redirected drive is specified for 
     DASDInfo.DirPath, the server name parameter value must be '' 
     This parameter must be specified 
   o DASDInfo.path 
     The directory that limits the space available, beginning with the 
     drive letter 
   o DASDInfo.avail 
     The available disk space (in KB) remaining in the entire tree of the 
     specified directory 
   o DASDInfo.usage 
     The amount of disk space (in KB) already occupied in the directory 
     indicated by DASDInfo.path 
SrvName     The computer name of the server to perform the check on. If a 
            redirected drive is specified for DASDInfo.DirPath, the server 
            name parameter value must be '' 
  
Example   


/* Check DASD directory limits on server */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETDASDCHECK     = 730
DASDInfo.DirPath = 'D:\APPS\DATA'
SrvName          = '\\DOMAIN_CONTRLR'

myRc = NetMisc(NETDASDCHECK, 'DASDInfo', SrvName)

if myRc <> '0' then do
 say 'Got error from NetMisc() ' myRc
 exitRc = 9
end
else do
 say 'The Directory limits are'
 say 'Path           ' DASDInfo.path
 say 'Available Space' DASDInfo.avail
 say 'In use         ' DASDInfo.usage
 exitRc = 0
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit exitRc

  
Example Output   


The Directory limits are'
Path            D:\APPS\DATA
Available Space 512
In use          201



Inf-HTML End Run - Successful