IBM OS/2 LAN Server REXX Utility DLL


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


NETLOGON Enumerate


The function enumerates logged on user accounts.   
Syntax 

MyRc = NetEnumerate(NETLOGON, 'logonInfo')
MyRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)

  
Parameters 
The parameters specified are: 
'logonInfo'       The REXX variable receiving the result. The variable is 
                  divided into: 
   o logonInfo.0 
     The number of user account names logged on 
   o logonInfo.i 
     The user account name i, where the variable i has a value from 1 to 
     logonInfo.0 
   o logonInfo.totalentries 
     The total number of entries available. If many entries are avaiable 
     the number of entries returned (logonInfo.0) is not identical to the 
     total numbers available 
SrvName           The server computer name. If the server computer name is 
                  '', this will be identical as a call to 
                  NetEnumerate(NETLOGON) with only two parameters (local 
                  server) 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* List logged on users accounts */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETLOGON = 50
SrvName  = '\\ITSCSV00'

myRc = NetEnumerate(NETLOGON, 'logonInfo', SrvName)

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

if logonInfo.0 = 0 then do
 say 'No user accounts logged on'
 call DropLsRxutFuncs
 exit 0
end

say 'Number of user entries: ' logonInfo.0
say

do i=1 to logonInfo.0
 say logonInfo.i
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

Number of user entries:  9

BERIT
A948R11
ITSCAIX1
SHIMIZU
A948R29
N$HUY
A948R33
JACOBB
A948R30



Inf-HTML End Run - Successful