IBM OS/2 LAN Server REXX Utility DLL


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


NETGROUPUSERS Get Info


The function returns a list of members of a particular group.   
Syntax 

MyRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)

  
Parameters 
The parameters specified are: 
'groupInfo'       The REXX variable receiving the result. The variable is 
                  divided into: 
   o groupInfo.0 
     Counts the number of user accounts defined in the group 
   o groupInfo.i 
     The user account number i defined in the group. The variable i has a 
     value from 1 to groupInfo.0 
SrvName           The computer name of the domain controller 
GroupName         The group name. The group name must be supplied 
  
Note 
The server computer name can be specified as '' for a local domain 
controller.   
Example   

/* Get group users */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETGROUPUSERS = 340
SrvName       = '\\ILIDC'
GroupName     = 'CSUSERS'

myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)

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

say

do i=1 to groupInfo.0
  say "UserId:        " groupInfo.i
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

UserId:         LINDBERG
UserId:         BRUGERID
UserId:         USERID



Inf-HTML End Run - Successful