The !USERNO() subroutine returns a list of QM user numbers for a given user name.
CALL !USERNO(userno, username)
DEFFUN USERNO(username) CALLING "!USERNO"
userno = USERNO(username)
The !USERNO() subroutine returns a field mark delimited list of the QM user numbers of processes running with the given user name. The user name is case insensitive. If there is no user logged in with that username, a null string is returned.
CALL !USERNO(UNO, USERNAME)
IF UNO # "" THEN
CRT "User numbers are: " : CHANGE(UNO, @FM, ", ")
CRT "There are no users logged in with this user name"
The above program fragment displays a comma separated list of QM users logged in under a given user name.