IBM OS/2 LAN Server REXX Utility DLL


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


GetLogonAsn()


This function returns the logon assignments for a userid. 
To function correctly, the administrator must be logged on one domain only 
and not have any value specified in the othdomains = parameter in 
IBMLAN.INI. 
It is recommended to use the functions described in  NetGetInfo(NETAPPSEL) 
 and  NetGetInfo(NETLOGONASN)  as a replacement.   
Syntax 

MyRc = GetLogonAsn(userid, 'asnList')

  
Parameters 
The parameters specified and returned are: 
userid            The userid 
asnList.0         The number of logon assignment found. It has a value of 
                  '-none-' if no assignments are found 
asnList.i         The returned assignment list. i has a value from 1 to 
                  asnList.0 The returned values are divided into two 
                  classes. For a device: 
                  type  device  alias
                  
                  For example:
                  
                  D= X: ALLFILES
                  
                  
                  For an public application the following values are 
                  returned: 
                  type applicationName
                  
                  For example:
                  
                  A= BOOKMST
                  
                  
  
Note 
The function works only on a single domain. The function will fail if the 
administrator has a value specified in the othdomains = parameter in 
IBMLAN.INI.   
Example   

/* List device and application assignment for a userid */

call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

userId = 'WS222B'

MyRc = GetLogonAsn(userId, 'asnList')

if MyRc = '0' then do
 say 'userid=' userId
 if asnList <> '-none-' then do
  do i=1 to asnList.0
   say asnList.i
  end
 end
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

A= BOOKMST
D=            X  ALLFILES



Inf-HTML End Run - Successful