IBM OS/2 LAN Server REXX Utility DLL


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


NETSESSION Get Info


The function retrieves information about a particular session.   
Syntax 

MyRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)

  
Parameters 
The parameters specified are: 
'sessionInfo'   The REXX variable receiving the result. The variable is 
                divided into: 
   o sessionInfo.cname 
     The computer name 
   o sessionInfo.username 
     The user name (Userid) 
   o sessionInfo.num_conns 
     The number of connections that have been made during the session 
   o sessionInfo.num_opens 
     The number of opens that have been made during the session 
   o sessionInfo.num_users 
     The number of sessions that are established between the server and 
     req 
   o sessionInfo.time 
     The number of seconds a session has been active 
   o sessionInfo.idle_time 
     The number of seconds a session has been idle 
   o sessionInfo.user_flags 
     The user flags 
   o sessionInfo.cltype_name 
     Set the name of the client types 
SrvName         The server computer name 
ComputerName    The computer name 
  
Note 
The server computer name can be specified as '' for a local server.   
Example   

/* Get session information */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETSESSION   = 180
SrvName      = '\\FSCDC'
ComputerName = '\\FSC30DCR'

myRc = NetGetInfo(NETSESSION, 'sessionInfo', SrvName, ComputerName)

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

say
say 'The computer name:    ' sessionInfo.cname
say 'Userid:               ' sessionInfo.username
say 'Connections made:     ' sessionInfo.num_conns
say 'Number opens:         ' sessionInfo.num_opens
say 'Sessions established: ' sessionInfo.num_users
say 'Session time:         ' sessionInfo.time
say 'Idle time:            ' sessionInfo.idle_time
say 'User flags:           ' sessionInfo.user_flags
say 'Client type:          ' sessionInfo.cltype_name

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

The computer name:     FSC30DCR
Userid:                FSCADMIN
Connections made:      3
Number opens:          1
Sessions established:  1
Session time:          176
Idle time:             0
User flags:            Unknown
Client type:           OS/2 LS 1.2



Inf-HTML End Run - Successful