IBM OS/2 LAN Server REXX Utility DLL


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


NETSERVERMODALS Get Info


The function gets server modals related information.   
Syntax 

MyRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)

  
Parameters 
The parameters specified are: 
'serverModalsInfo' The REXX variable receiving the result. The variable is 
                  divided into: 
   o serModalsInfo.role 
     The server role. The following will be returned: 
     String returned
     ---------------
     Standalone server
     Member server in the domain
     Backup server in the domain
     Primary server in the domain
     
     
     
   o serModalsInfo.primary 
     The name of the primary domain controller to which the server belongs 
                  
SrvName           The server computer name. 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Get server modals information */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETSERVERMODALS = 370
SrvName         = '\\ILIDC'

myRc = NetGetInfo(NETSERVERMODALS, 'serverModalsInfo', SrvName)

if myRc <> '0' then do
 say 'Got error from NetGetInfo() ' myRc
 call DropLsRxutFuncs
 exit 9
end

say
say 'Server role:            ' serverModalsInfo.role
say 'Domain Controller name: ' serverModalsInfo.primary

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

Server role:             Primary server in the domain
Domain Controller name:  ILIDC



Inf-HTML End Run - Successful