TANDEM
Connects the TANDEM user's port to a specified target port so that target port activity is displayed at the TANDEM user's terminal for monitoring purposes. Also, in feed mode, it allows the TANDEM user's port to pass input to the target user process.
Syntax
TANDEM target-port{ (options}
Syntax elements
target-port is the number of the port to be monitored.
Options
D Starts Tandem with the System debugger (rdb) and DataBasic debugger streams intercepted and only displayed on the TANDEM terminal. Input to these streams will be from the TANDEM terminal. Standard output will only be on the target terminal and keyboard input will be from the target terminal.
DK Works as for (D except standard input will be from the TANDEM terminal so full control is available from one keyboard. When the target terminal requires input a TNDM_0>
prompt will be seen on the TANDEM terminal.
F Enable feed mode immediately.
V Establishes a view mode session with the same restrictions as the PEEK command. That is, the session can be terminated with the return key and the TANDEM menu cannot be displayed, so the TANDEM commands are not available.
Restrictions
Both users must be connected to the same Reality database.
Tandem operation must be enabled on the target port. This can be done:
- By using SSM to enable Tandem on the user's security profile.
- By using ALLOW-TANDEM on the target terminal to enable Tandem.
Note
Both SSM and ALLOW-TANDEM give you the option to allow or enable Tandem. If Tandem is allowed rather than enabled, the user must enable access with the system debugger before connection can be made.
TANDEM does not allow you to monitor underlying host terminal I/O (for example, when you use the SYS command).
Field Read
When TANDEM is used in conjunction with Field Read, to minimise differences between the target and TANDEM user's terminal displays, the TANDEM user's port must be set up in exactly the same terminal mode as the target port before commencing Tandem operation. For example, if Field Read operation is disabled on the target port, it must be disabled on the TANDEM user's port. If the Field Read terminal executive (T.E.) is loaded and Field Read is enabled on the target port, then the T.E. must be loaded and Field Read enabled on the TANDEM user's port.
Tandem modes
TANDEM connects the user's port to the specified target port and operates with the target port in one of two modes:
- View mode, where all activity on the target port is also displayed on the TANDEM user's terminal.
- Feed mode, where input to the TANDEM user's port is passed to the target user process, except for the break sequences described below. By default, all target input/output is displayed on both the target and TANDEM users' terminals. However, you can specify a stream number, so that input/output for that stream is re-routed to the TANDEM user's terminal; in this way you can set up split-screen debugging, with normal input/output taking place at the user's terminal and debugging being carried out on the TANDEM terminal.
Tandem commands
To change a mode or quit Tandem operation altogether, you must interrupt the Tandem process by pressing the current break key (this can be temporarily changed with the B command described below). The following menu is displayed:
? This help menu Q Exit tandem F Enable feed mode F n Enable feed mode on stream n V Revert to view mode V n Revert to view mode on stream n M t Send message 't' P n Set privilege level n (0,1 or 2) S 1 Split screen debugger with keyboard feed S Split screen debugger without keyboard feed D Force to Debugger (Send interrupt) and exit menu B ^k Redefine Break-key as Control-k Streams: 0 - App, 1 - RDB, 2 - DB Debug, 3 - Func Trace
Enter:
?Display help.
F {stream}To select feed mode. If no stream number is specified, all target input/output is displayed on both the target and TANDEM users' terminals. If you specify a stream number, input/output for that stream is re-routed to the TANDEM user's terminal.
Valid stream numbers are in the range 0 to 15. Stream 0 is normal Reality input/output and stream 1 is debugger input/output (system debugger). None of the other streams are currently used.
V {stream}To select view mode. If no stream number is specified, selects view mode on all streams; otherwise, deselects feed mode on the specified stream.
MSend a message to the target port's terminal.
P privilegeTo select privilege level 0, 1 or 2 (similar to SET-PRIV command).
S {1}To enable split screen debugging (if 1 is specified, with keyboard feed).
DForce the target process into the default application debugger if one is enabled or, if not, into the system debugger.
B keyTo temporarily change the break key. To specify a control key combination, precede the key with a caret character (^); for example, ^C specifies CTRL+C. The change lasts only until TANDEM is terminated.
QTo quit TANDEM operation.
When in command mode, the command prompt displays the current mode (view or feed) and, if in feed mode, a bit-significant hexadecimal number representing the currently enabled streams. The default is ffff
(all streams enabled). For example:
Tandem/View>
Tandem is in view mode.
Tandem/Feed:ffff
Tandem is in feed mode on all streams.
Tandem/Feed:0002
Tandem is in feed mode on stream 1 only (bit 1 is set).
Tandem/Feed:0003
Tandem is in feed mode on streams 0 and 1 (bits 0 and 1 are set).
Press RETURN to leave command mode.
When Tandem mode is requested, it becomes effective at the start of a read or a write operation to the port. Any active read or write is allowed to complete before Tandem mode is started.
If after entering Tandem, the target does not respond within 5 seconds, Tandem times out, displaying the message Port is not responding
. This message will also be displayed if Tandem operation is disabled on the target port.
Example
:
TANDEM 401
Allows you to monitor on your current terminal the screen activity on the terminal connected to port 401.