tandem command

The tandem command BASIC program links the current port to another process. Any input or output to either screen affects both screens.

Syntax

 tandem port.number{(options}

Parameter(s)

options d Designates the sequence of (up to four) characters to terminate tandem mode.
  • Each character is provided in its hexadecimal equivalent of its ASCII value.
  • Each character is separated by a comma.

    For example, d/41,42,43,44, indicates that an "ABCD" disconnects the link.

  • The first two characters of the termination sequence must be different.

    For example, it does not accept "d/2b,2b,2b" (+++), but it accepts "d/2a,2b,2b" (*++).

f Turns off the tandem command on the current port.

This keeps others from being able to tandem the current port. Specifying the port number allows turning off the tandem command on another port.

n Turns on the tandem command on the current port. This gives others the ability to tandem the current port.
Note: This option cannot be used with the u option.

Specifying the port number allows turning on tandem on another port.

s Suppresses the message when the process terminates.

If this is used with the d option, the s option must precede the d option.

u Unconditionally turns off the tandem command when used with the f option.
x Terminates the tandem command on the target device number.
Note: When the tandem command is from a d3tcl session, Ctrl+x does not terminate the tandem command.

In such a case, you must type Ctrl+x (followed by an x to terminate the tandem command).

y Sets the notify option.

When the tandem command is started or terminated on the process, the command specified for the tdmon or tdmof signals the trap TCL command.

Description

The tandem command requires sys2 privileges.

The port initiating the tandem command is the master. The process being attached is the target. If the target process is a phantom process, the output from the phantom is redirected to the master. The target device (the one attached to the target) must be available on the specified port. It cannot be already attached to another process.

CAUTION:
If the master and target processes are different types of screens, or are using different emulations or terminal types, the output to the master screen might be garbled.

If the current task has esc-level in effect, the tandem command automatically issues an esc-data so that it can be terminated by Esc+x sequence.

It does not, however, reset the esc-level upon termination. The tandem command must be manually re-executed to restore to its previous state. When a process pushes a shell to UNIX while being issued a tandem command by another port, theoretically, the D3 process is suspended by UNIX. Therefore, the input from the master is not processed by the D3 process until it is reactivated by UNIX.

A hot key sequence disconnects the link. The default hot key sequence is Esc+x. If an esc-data has not been issued previously, the process issues it automatically to prevent getting locked out from being able to suspend the tandem command.

You can change the default escape sequence system-wide or for an account.
  • Put the item Tandem-Terminating-Sequence in the master dictionary with the escape sequence you want to use.

    For Esc+X (capital X), you can put x'1B580000' in attribute 1 of that item.

  • Alternatively, if you put Tandem-Terminating-Sequence in dm, it will work as the default for all accounts.

    This is true unless the accounts use the d option on the tandem command or have a different item in their own account.

Example(s)

Example 1

This example attaches the current process to port 13:

 tandem 13

Example 2

This example attaches to port 3 and sets the hot key sequence to *++:

 tandem 33 (d/2a,2b,2b

Example 3

This example enables the ability to issue the tandem command on the current port:

 tandem (n

Example 4

This example unconditionally disables the tandem command capability on port 42:

 tandem 42 (uf

Example 5

This example terminates the tandem command on port 13:

 tandem 13 (x

Example 6

This example shows that the tcl command can be used to enable the tandem command on another port:

 tcl 42 bob tandem (n
 tandem 42