LOGTO

Top  Previous  Next

 

The LOGTO command moves to an alternative account directory without leaving QM.

 

 

Format

 

LOGTO name {RESET}

 

where

 

nameis the name of the target account. This may be an account name as in the ACCOUNTS register of the QMSYS account or the pathname of the new account directory.

 

RESETcauses the command processor to discard all active paragraphs, menus, etc.

 

 

Multiple accounts are useful where there are several distinct projects. They can also be used to separate development and production versions of an application.

 

The LOGTO command closes the current VOC, moves to the account directory specified by name and opens the VOC of the new directory. If the RESET keyword is present, any active programs, menus, etc at the current command processor level are discarded. This is particularly useful when using LOGTO in a menu.

 

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.

 

If the LOGTO action is successful, the account name as reported by the WHO command or returned as the value of the @WHO system variable is set to the new account.

 

LOGTO will fail if name cannot be found or is not a valid account.

 

The QUIT command to leave QM will return to the original account directory before exiting.