The QMLogto() function moves to an alternative account. It is analogous to the LOGTO command.
The function takes a single argument, Account, as the name of the QM account to be accessed.
If successful, the function returns True. If unsuccessful, the function returns False and the QMError() function can be used to retrieve a text error message identifying the cause of the failure.
If the VOC of the current account contains an executable item named ON.LOGTO, usually a paragraph, this will be executed before moving to the new account.
If the VOC of the new account contains an executable item named LOGIN, this will be executed on arrival in the new account.
A QMClient session can be recognised within these paragraphs by testing the value of @TTY which will be "vbsrvr" for QMClient.
The examples below attempt to move to the account identified Account. If unsuccessful, it displays an error message including the text returned by QMError().