IBM OS/2 LAN Server REXX Utility DLL


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


SetLogonAsn()


This function sets logon assignment for a userid. 
To function correctly, the administrator must be logged on to 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  NetAdd(NETAPPSEL) 
 and  NetAdd(NETLOGONASN)  as a replacement.   
Syntax 


MyRc = SetLogonAsn(userid, asnType, device, alias)

  
Parameters 
The parameters specified are: 
userid            The userid 
asnType           The assignment type. The accepted values are: 

                  asnType What
                  ------- ----
                   'A='   Public application assignment
                   'D='   Device assignment, such as G:, COM5, LPT3 or none
                  
                  
                  For a device assignment type a parameter value of '' can 
                  be specified 
device            The device specification. This value can either be a 
                  drive, a com port or a printer port. An empty value can 
                  also be specified. 
                  This parameter value is ignored for Public application 
                  assignments 
alias             The alias name for devices otherwise the name of the 
                  public application 
  
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 or logged on to another domain.   
Example   


/* Add device and application logon assignments */

userid      = 'WS222B'
device      = 'X:'
alias       = 'ALLFILES'

/* Get access to LSRXUT.DLL functions */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

MyRc = SetLogonAsn(userid, 'D=', device, alias)
if MyRc <> '0' then do
 say 'SetLogonAsn() returned ' MyRc
end
else do
 say 'Successfully performed Logon Assignment'
end

applName = 'BOOKMST'

MyRc = SetLogonAsn(userid, 'A=', '', applname)
if MyRc <> '0' then do
 say 'SetLogonAsn() returned ' MyRc
end
else do
 say 'Successfully performed Public Application Assignment'
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   


Successfully performed Logon Assignment
Successfully performed Public Application Assignment



Inf-HTML End Run - Successful