IBM OS/2 LAN Server REXX Utility DLL


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


NETSERVER Set Info


The function modifies a control parameter of a server.   
Syntax 

MyRc = NetSetInfo(NETSERVER, 'PARAMETER', parmValue, SrvName)

  
Parameters 
The parameters required are: 
'PARAMETER'       The parameter name of the server parameter to be 
                  modified. The parameter values that causes a change of 
                  the server control 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 occur. 
   o comment 
     A string containing a comment describing the server 
   o disc 
     The autodisconnect time (in minutes).  A session is disconnected if 
     it is idle longer than the time specified by the parameter disc 
   o alerts 
     A string containing the list of user names on the alert table of the 
     server. Spaces separate the names 
   o hidden 
     The parameter determines whether the server is visible to other 
     computers in the same domain. The following values are defined: 
     
     VALUE     MEANING
     -----     -------
     0         Visible server
     1         Hidden server, not visible
     
     
     
   o announce 
     The network announce delta (in seconds), which determines how often 
     the server is to be announced to other computers on the network 
   o anndelta 
     The random announce rate (in milliseconds) for the announce 
     parameter. The announce interval (announce parameter) can vary by the 
     amount specified in the anndelta parameter 
   o alertsched 
     The alert interval (in seconds) for notifying an administrator of a 
     network event 
   o erroralert 
     The number of entries that can be written to the error log file 
     during the alertsched parameter interval before notifying an 
     administrator 
   o logonalert 
     The number of failed logon attempts to allow a user before notifying 
     an administrator 
   o accessalert 
     The number of failed file accesses to allow before issuing an 
     administrative alert 
   o diskalert 
     The number of kilobytes of free disk space at which an administrator 
     must be notified that the free space is low 
   o netioalert 
     The network I/O error ratio (in tenths of a percent) to allow before 
     notifying an administrator 
   o maxauditsz 
     The maximum audit file size (in KB) 
parmValue         The value of the parameter that is being modified 
SrvName           The server computer name 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Net server set info */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETSERVER  = 160
parameter  = 'maxauditsz'
parmValue  =  512
SrvName    = '\\KING_BALU'

myRc = NetSetInfo(NETSERVER, parameter, parmValue, SrvName)

if myRc <> '0' then do
 say 'Got error from NetSetInfo() ' myRc
 rcCode = 9
end
else do
 say "Done"
 rcCode = 0
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit rcCode

  
Example Output   

Done

  
The function modifies a parameter of a shared resource.   
Syntax 

MyRc = NetSetInfo(NETSHARE, 'PARAMETER', parmValue, netName, SrvName)

  
Parameters 
The parameters required are: 
'PARAMETER'       The parameter name of the share parameter value to be 
                  modified. The parameter values that causes a change of 
                  the share 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 remark 
     The remark set for the resource share 
   o max_uses 
     The maximum of concurrent connections to the shared resource 
parmValue         The value of the parameter that is being modified 
netName           The network name of the shared resource 
SrvName           The server computer name where the shared resource 
                  resides 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Net share set info */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETSHARE  = 190
/* parmValue = 100 */
parmValue = 'This is Book ManagerRead/2'
netName   = 'BOOKMGR'
SrvName   = '\\KING_BALU'

/* myRc = NetSetInfo(NETSHARE, 'max_uses', parmValue, netName, SrvName) */
myRc = NetSetInfo(NETSHARE, 'remark', parmValue, netName, SrvName)

if myRc <> '0' then do
 say 'Got error from NetSetInfo() ' myRc
 rcCode = 9
end
else do
 say "Done"
 rcCode = 0
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit rcCode

  
Example Output   

Done



Inf-HTML End Run - Successful