!USERNAME()

!USERNAME()

Top  Previous  Next

 

The !USERNAME() subroutine returns the user login name for a given QM user number.

 

 

Format

 

CALL !USERNAME(name, userno)

 

or

 

DEFFUN USERNAME(userno) CALLING "!USERNAME"

name = USERNAME(userno)

 

where

 

nameis the returned user login name.

 

usernois the user number to locate.

 

 

The !USERNAME() subroutine returns name as the login name associated with a given user number. If there is no user logged in with that userno, a null string is returned.

 

 

Example

 

READU INV.REC FROM INV.F, INV.NO

LOCKED

  CALL !USERNAME(UNAME, STATUS())

  PRINTERR "Invoice is locked by user " : UNAME

END THEN

  GOSUB PROCESS.INVOICE

END

 

The above program fragment displays the login name of the user holding the lock if the READU is blocked by another user.