IBM OS/2 LAN Server REXX Utility DLL


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


NETGROUPUSERS Add


The function adds a user account to a group.   
Syntax 


MyRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)

  
Parameters 
The parameters required are: 
SrvName           The server computer name of the domain controller 
GroupName         The group name 
UserId            The name of the userid to add 
  
Note 
The server computer name can be specified as '' for a local domain 
controller.   
Example   


/* Add a userid to a group */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETGROUPUSERS = 340
SrvName       = '\\ILIDC'
GroupName     = 'CS2USERS'
UserId        = 'WS2332'

myRc = NetAdd(NETGROUPUSERS, SrvName, GroupName, UserId)

if myRc <> '0' then do
 say 'Got error from NetAdd() ' myRc
 call DropLsRxutFuncs
 exit 9
end
else do
 say
 say "Userid added to Group successfully"
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


Userid added to Group successfully



Inf-HTML End Run - Successful