0.9b (c) 1995 Peter Childs
The function lists all group accounts on the UAS database.
Syntax
MyRc = NetEnumerate(NETGROUP, 'groupInfo') MyRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName)
Parameters
The parameters specified are:
'groupInfo' The REXX variable receiving the result. The variable is divided into:
o groupInfo.0
The number of groups
o groupInfo.i
The group name i, where the variable i has a value from 1 to groupInfo.0
o groupInfo.totalentries
The total number of entries available. If many entries are avaiable the number of entries returned (groupInfo.0) is not identical to the total numbers available
SrvName The server computer name
Note
The server computer name can be specified as '' for a local server.
There call to NetEnumerate with 2 parameters is identical to the call with 3 parameters where SrvName is set to ''.
Example
/* List group names */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETGROUP = 70 SrvName = '\\DOMAIN_CONTRLR' myRc = NetEnumerate(NETGROUP, 'groupInfo', SrvName) if myRc <> '0' then do say 'Got error from NetEnumerate() ' myRc call DropLsRxutFuncs exit 9 end if groupInfo.0 = 0 then do say 'No group names found. You may have a problem.' call DropLsRxutFuncs exit 0 end say 'Number of group names: ' groupInfo.0 say do i=1 to groupInfo.0 say groupInfo.i end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Number of group names: 10 GROUPID GROUP200 GROUP201 GROUP202 SERVERS ACLGROUP LOCAL USERS ADMINS GUESTS
Inf-HTML End Run - Successful