The flags to tn3270 are as follows:
When tn3270 first connects to the remote system, it will negotiate to go into 3270 mode. Part of this negotiation involves telling the remote system what model 3270 it is emulating. In all cases, tn3270 emulates a 3278 terminal. To decide which specific model, tn3270 looks at the number of lines and columns on the actual terminal (as defined in the TERM environment variable; see termcap(5)). The terminal (or window in which tn3270 is running, on multiple window systems) must have at least 80 columns and 24 lines, or tn3270 will not go into emulation mode. If the terminal does have at least 80 columns and at least 24 lines, the following table describes the emulation:
Emulation of the 3270 terminal is done in the
UNIX
process.
This emulation involves mapping
3270-style commands from the host
into appropriate sequences to control the user's terminal screen.
Tn3270
uses
curses(3)
and the
/usr/share/misc/termcap
file to do this.
The emulation also involves simulating the special 3270 keyboard keys
(program function keys, etc.)
by mapping sequences of keystrokes
from the
ASCII
keyboard into appropriate 3270 control strings.
This mapping is terminal dependent and is specified
in a description file,
/usr/share/misc/map3270
(see
map3270(5))
or in an environment variable
MAP3270
(and, if necessary,
MAP3270A
MAP3270B
and so on - see
mset(1)).
Any special function keys on the
ASCII
keyboard are used whenever possible.
If an entry for the user's terminal
is not found,
tn3270
looks for an entry for the terminal type
unknown
If this is not found,
tn3270
uses a default keyboard mapping
(see
map3270(5)).
The first character of each special keyboard mapping sequence is either an ASCII escape (ESC ) a control character, or an ASCII delete (DEL ) If the user types an unrecognized function key sequence, tn3270 sends an ASCII bell (BEL ) or a visual bell if defined in the user's termcap entry, to the user's terminal and nothing is sent to the IBM host.
If tn3270 is invoked without specifying a remote host system name, it enters local command mode, indicated by the prompt ``tn3270> '' In this mode, tn3270 accepts and executes all the commands of telnet(1), plus one additional command:
Tn3270 command mode may also be entered, after connecting to a host, by typing a special escape sequence. If tn3270 has succeeded in negotiating 3270 mode with the remote host, the escape sequence will be as defined by the map3270 (see map3270(5)) entry for the user's terminal type (typically control-C); otherwise the escape sequence will initially be set to the single character `^] ' (control right square bracket).
While in command mode, any host login session is still alive but temporarily suspended. The host login session may be resumed by entering an empty line (press the RETURN key) in response to the command prompt. A session may be terminated by logging off the foreign host, or by typing ``quit'' or ``close'' while in local command mode.
Not all 3270 functions are supported, nor all Yale enhancements.
Error conditions (attempting to enter data in a protected field, for example) should cause a message to be sent to the user's terminal instead of just ringing a bell.