IBM OS/2 LAN Server REXX Utility DLL


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


NetMisc(NETGETDCNAME)


The function return the domain controller name of a domain.   
Syntax 

parse value NetMisc(NETGETDCNAME, DomainName, SrvName) with MyRc dcName

  
Parameters 
The parameters required are: 
DomainName        The name of the doamin 
SrvName           Computername of the machine to execute this command 
                  A remote server computer name if remote, otherwise '' 
dcName            The computer name of the domain controller 
  
Example   

/* Get DC name */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETGETDCNAME = 510
SrvName      = '\\ANYSRV01'
DomainName   = 'ANYDOM01'

parse value NetMisc(NETGETDCNAME, DomainName, SrvName) with myRc dcName

if myRc <> '0' then do
 say 'Got error from NetMisc() ' myRc
 exitRc = 9
end
else do
 say 'DC name is' dcName
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit exitRc

  
Example Output   

DC name is  ANYSRV01



Inf-HTML End Run - Successful