tn3270

full-screen remote login to IBM VM/CMS

Syntax:



tn3270 [-d] [-n filename] [-t command_name]
       [sysname [port]]

Options:

-d
Turn on socket-level tracing (for superuser only).
-n filename
Use this file to receive network-trace data output from the commands toggle netdata and toggle options (see the telnet utility). The default is for output to be directed to standard error.
-t command_name
Use this command to process IBM 4994-style transparent mode data received from the remote IBM machine.
sysname
The name of the remote system. If you don't specify the remote name, you'll be prompted for a command (see the Description below).
port
The port to connect to on the remote system. Normally, tn3270 attempts to connect to the standard TELNET port (port 23) on the remote machine.

Description:

The tn3270 utility permits a full-screen, full-duplex connection from a QNX machine to an IBM mainframe or compatible machine. The utility gives the appearance of being logged in to the remote machine from an IBM 3270 terminal. Of course, you must have an account on the machine that you connect to in order to log in.

The tn3270 utility looks to the user in many respects like the Yale ASCII Terminal Communication System II. It is, however, a modification of the Arpanet TELNET user interface (see telnet) that will, in certain circumstances, interpret and generate raw 3270 control streams.

When tn3270 first connects to the remote system, it negotiates to enter 3270 mode. Part of this negotiation involves telling the remote system what model 3270 that tn3270 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. The terminal (or window in which tn3270 is running, on multi-window systems) must have at least 80 columns and 24 lines, or tn3270 won't go into emulation mode. If the terminal has at least 80 columns and 24 lines, the emulation is as follows:

Minimum size (rowsxcolumns) Emulated terminal
27x132 3278 model 5
43x80 3278 model 4
32x80 3278 model 3
24x80 3278 model 2

To enable model 3 or 4, you must set the LINES environment variable. For example:

export LINES=43

You must also change the physical screen; see the section on ``Changing the console fonts'' in the QNX Installation & Configuration guide.

Emulation of the 3270 terminal is done in the QNX process. This emulation involves mapping 3270-style commands from the host into appropriate sequences to control the user's terminal screen.

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 the description file /etc/map3270. Any special function keys on the ASCII keyboard are used whenever possible. If an entry for the user's terminal isn't found, tn3270 looks for an entry for the terminal type unknown. If this isn't found, tn3270 uses a default keyboard mapping (see map3270). We recommend that you use the qnx entry of the /etc/map3270 file.

The first character of each special keyboard mapping sequence is either an ASCII escape (ESC), a control character, or an ASCII delete (DEL). If you type an unrecognized function key sequence, tn3270 sends an ASCII bell (BEL) or a visual bell to your terminal; nothing is sent to the IBM host.

If you invoke tn3270 without specifying the system name of a remote host, it enters local command mode, indicated by the prompt:

tn3270>

In this mode, tn3270 accepts and executes all of telnet's commands, plus one additional command:

transcom

You use this command for IBM 4994-style transparent-mode processing.

If you've connected to a host, you can also enter tn3270's command mode by typing a special escape sequence. If tn3270 has succeeded in negotiating 3270 mode with the remote host, the escape sequence will be defined by the escape entry for your terminal type in the map3270 file (typically Ctrl -] ).

While tn3270 is in command mode, any host login session is still alive but temporarily suspended. You may resume the host login session by entering an empty line (i.e. by pressing Enter) in response to the command prompt. To terminate a session, log off the foreign host or type quit or close while in command mode.

Notes

The IBM 4994-style transparent-mode command is invoked when tn3270 receives IBM 4994-style transparent output from the remote host. Output and input pipes are created for communication between the two processes. The pipes are closed when a 3270 clear command is received from the remote host, signaling the end of transparent-mode output. Transparent mode is necessary for sending ASCII control characters over the 3270 terminal connection-support for ASCII graphics terminals is accomplished this way. Developers of transcom commands should note that the transcom standard-input pipe end will be in CBREAK mode, with ECHO and CRMOD turned off.

Files:

/etc/map3270
Database for mapping ASCII keystrokes into IBM 3270 keys.

Environment variables:

This utility checks the TERM environment variable.

Caveats:

This utility is slow and makes large demands on system resources.

Not all 3270 functions are supported, nor are all Yale enhancements.

Error conditions (e.g. attempting to enter data in a protected field) should cause a message to be sent to the user's terminal instead of just ringing a bell.

See also:

telnet, /etc/map3270 file

``Yale ASCII Terminal Communication,'' System II Program Description/Operator's Manual (IBM SB30-1911)