![[About]](r:\html\lsrxabout.gif)
![[Toc]](r:\html\lsrxtoc.gif)
0.9b (c) 1995 Peter Childs
This function monitors the number of shares on a server. The administrator who wrote this procedure wanted to know if the MAXSHARES parameter was configured correctly.
NUMSHARE Procedure
/* Display number shares on a server */
call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
call SysLoadFuncs
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs
NETSHARE = 190
SrvName = '\\FSCDC'
'@CLS'
signal on error name error
signal on halt name error
signal on syntax name error
call SysCurState OFF
do forever
myRc = NetEnumerate(NETSHARE, 'shareInfo', SrvName)
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call SysCurState ON
call DropLsRxutFuncs
call SysDropFuncs
exit 9
end
if shareInfo.1 = '-none-' then do
say shareInfo.1
call SysCurState ON
call DropLsRxutFuncs
call SysDropFuncs
exit 0
end
pos = SysCurPos(0,0)
say 'Time:' TIME('N') 'Num shares: ' shareInfo.0
call SysSleep 60
end
error:
call SysCurState ON
call DropLsRxutFuncs
call SysDropFuncs
call RxFuncDrop 'LoadLsRxutFuncs'
exit 0
Inf-HTML End Run - Successful