LOGON
Logs on another port to the current database.
Syntax
LOGON port, user-id,user-password {account-name,account-password}
Syntax Elements
port is the port number in decimal.
user-id is the user-id.
user-password is the password for the user. This must be present if there is one.
account-name is the name of an account to logon to. It will be ignored if the user's security profile specifies a default account.
account-password
is the password for the account.
Prompts
If you enter the LOGON command with no parameters, the following prompt is displayed:
Port#,Userid,UserPassword Account,AccountPassword:
You must then enter the number of the port, the user-id, and the user's password (if any). These fields can be followed by the account name and the account password (if any). Remember to precede the passwords with commas, but do not use blank spaces.
Comments
If you enter LOGON with a port number of -1, Reality allocates the next available 'pseudo' port number to LOGON. A 'pseudo' port has a process number, but does not physically exist on the system.
The -1 extension is useful only if the logged on process executes a user or account logon control program which then performs one or more specified commands, as long as they do not involve terminal input/output. A process logged on to a -1 pseudo port without such a program will log off automatically as soon as it tries to read from a terminal.
It is possible to LOGON a port which is not defined in the devices files by supplying a file in the local directory which the process can write screen output to, for example:
$ touch PortOut.73
$ reality tdb:
LOGON 73,CTEST.SLAVE SYSMAN
Further, an output file does not need to be created at all when port -1 is used; the output is just lost, for example:
:
LOGON -1,CTEST.SLAVE SYSMAN
Restrictions
To execute this command the account must have SYS2 privilege level.
On a UNIX system, the port to be logged on must have a device file permanently assigned. How this is achieved depends on the UNIX platform on which it is running. Appropriate read, as well as write, permissions must be given to the port's device file. See Allocating TIPH Ports for details.
Examples
:LOGON
Port#,Userid,UserPassword Account,AccountPassword:4,LYNDA,BEIGE
[533] LOGON SUCCESSFUL
This logs on port 4 user LYNDA (password BEIGE).
:
LOGON 17,EMP7158,NOIR SALES,SHRIMP
This logs on port 17 user EMP7158 (password NOIR) to account SALES (password SHRIMP).
:
LOGON -1,FRED,BEAR FINANCE,MUSSEL
This logs on user FRED (password BEAR) into account FINANCE (password MUSSEL) and allocates a process, but not a physical port. The process will execute any logon control program present in the account and log off as soon as terminal input/output occurs.