Logging On and Off

A user must log on to the system to gain access to the Terminal Control Language (TCL) processor. The Logon processor monitors each communications line. It displays a logon prompt and waits for user input.

To log on, a user must supply the name of the account and, usually, a password. Invalid logon entries cause an error message to be displayed and the logon prompt reappears.

The Logon processor must be able to find an Account Definition item in the SYSTEM Dictionary that matches the account name entered at the logon prompt. It then must verify the password. Once the account name and password are verified, the Logon processor sets up a pointer in the user’s workspace to the Master Dictionary for that account and normally passes control to the TCL processor. The Account Definition item also establishes the user’s privilege level and various account-level options.

The Logoff processor ends user sessions on the mvBase system. The user must type OFF at the TCL prompt or from the Debugger.

Restricting User Access

The number of users that can log onto mvBase at any one time is set by the system administrator using the MAXUSERS command. Once this limit has been reached, as additional users attempt to log on, they will be denied access. The MAXUSERS command is sometimes used to prevent users from gaining access to the system during a filesave.

Access to an account can also be restricted to one or more selected processes. The number of processes that are permitted to log onto the account must be specified as values in Attribute 12 of the Account Definition item.

The Logon Proc

The Logon Proc is a user-defined Proc bearing the same name as the account; it is stored in the Master Dictionary of the account being logged on. This Proc is executed when a user logs onto the account, whether from the logon prompt or by using the LOGTO command. The Logon Proc is also executed upon exiting to TCL from the system, providing that the user’s Account Definition item does not have a T in Attribute 9 (see Restricting Access to TCL).

The two main uses for a Logon Proc are to:

For instance, you can use this Proc to establish terminal and printer characteristics for your session. You can insert the TERM command to set your terminal type. You can also use the SP-ASSIGN command to change the default printer assignment for the account.

For instance, in the account named SALES, the following Proc is stored in the Master Dictionary:

PQ

HTERM 132,,,,1

P

Similarly, a Logon Proc could prompt a user to identify the type of terminal at which he or she is working, and then set the terminal type appropriately.

Restricting Access to TCL

A Logon Proc can be used to automatically invoke an application when a user logs on and bypass the TCL level. However, that does not necessarily prevent the user from exiting the program and getting to the TCL level. To deny access to TCL:

  1. Edit the user’s Account Definition item. Type T in Attribute 9.

  2. Create a Proc in the user’s Master Dictionary with the name of the account followed by @TCL. Thus, in the STAFF account, you’d create a Proc named STAFF@TCL.

  3. Create an @TCL Proc in the ERRMSG file. This Proc gets executed only if an @TCL Proc does not exist in the Master Dictionary. ERRMSG is usually a global file used by all users. This Proc should not be account-specific.

If Attribute 9 of the Account Definition item contains a T, and neither Proc exists, then the user will go to TCL. If the Proc does exist, it will be executed whenever the user’s process reaches a state where the TCL prompt would appear. This Proc might present the user with a menu of various application-specific selections, or it might simply execute the OFF command.

NOTE

If this Proc returns control to TCL, it will be invoked again and again in a loop.

Receiving System Messages

When you log on, you might see a message that is sent to all users of the system. These messages are created by the system administrator as a LOGON item in the system ERRMSG file. For example, the administrator might need to notify users that the system will be taken down after 6 PM to perform routine maintenance. Thus, you might see the message:

**** SYSTEM WILL BE DOWN FROM 6PM TO 7PM TONIGHT ****

The LOGON item must exist in the ERRMSG file, even if there are no system messages.

During a user session, broadcast messages can be sent by the administrator or other users using the MSG command. For additional information regarding the MSG command, see User Account Command Reference.

Logging to Other Accounts

You can use the LOGTO command to log directly to another account without logging off the system. You must know the account name and password for that account. You must supply the name of the account as a command-line parameter. The password is an optional command-line parameter and you will be prompted for it if it is required and you do not supply it.

For instance, the following commands log to the STAFF account:

>LOGTO STAFF,GTY708

or:

>LOGTO STAFF

PASSWORD: GTY708

The account’s usage statistics are updated and displayed on the screen. The TCL command stack is maintained when you log to a different account, as is tape or floppy disk attachment.

Logging Other Users On and Off

The LOGON and LOGOFF commands provide a way to log on and off other users at other processes. Both commands are located in the SYSPROG account.

LOGON and LOGOFF can be used to log on and off terminals, making them available for a group of users, none of whom actually log on or off the system. Such terminals might run a program that displays a continuous listing of events at a college, for instance. LOGON and LOGOFF can be used to run phantom processes that do not require user intervention. To log on a remote process, enter the LOGON command and the following prompt displays:

PROCESS, NAME

You must specify the process number followed by a comma and then the account name and, if required, a password preceded by a comma. To log off a remote process, enter the LOGOFF command and you will be prompted to enter the process number. Both commands display a message indicating that the operation was successful. LOGOFF can also be used to log off users who cannot quit their session normally by entering the OFF command at the terminal.

Automatic Logoff

Automatic logoff can be enabled for a process, causing the process to be logged off the system after a specified period of inactivity. The AUTO-LOGOFF command, available in the SYSPROG account, establishes automatic logoff for a process.

Format

AUTO-LOGOFF target [seconds] [(options)]

Parameter(s)

target

Name of an account, a process number, or a range of processes.

seconds

Number of seconds of CPU inactivity before the process is automatically logged off.

options

C

Turns off automatic logoff for the specified process or processes

D

Monitors the incoming DTR signal for the specified process and performs an automatic logoff if none is detected.

If neither seconds nor options is specified, the current AUTO-LOGOFF settings for the specified processes are displayed.

The following example specifies that process number 9 be automatically logged off after 600 seconds (10 minutes) of CPU inactivity:

>AUTO-LOGOFF 9 600

See Also

Using the Terminal Control Language

Overview of TCL User Commands

Using the TCL Stacker

Setting Line and Process Characteristics

TCL Stacker Command Reference