Strovent SystemsSign in
Reference

How a 3270 terminal works

Block-mode screens, fields, and why a 3270 session feels different from a shell.

A 3270 terminal does not send each key to the host as you type. The host sends a whole screen at once. You move around and type into it, and nothing leaves your device until you press a key that tells the host to read the screen. This is called block mode.

The conversation

  1. The host sends a screen: text, plus the layout of the fields on it (see Fields and attributes).
  2. You type into the input fields. The terminal handles cursor movement, insert, delete and tabbing locally.
  3. You press an AID key such as Enter or PF3 (see AID keys).
  4. The terminal sends the AID key, the cursor position, and the fields you changed.
  5. The keyboard locks until the host answers with the next screen.

Because only changed fields travel, 3270 works well over slow or busy links, and a host can serve thousands of users.

The data stream

The bytes the host sends are called the 3270 data stream. It is made of a few commands and many orders:

  • Commands say what to do with the screen: write, erase and write, read the modified fields, and so on.
  • Orders sit inside the text and shape it: start a field, set the buffer address, insert the cursor, repeat a character to an address.
  • Text is EBCDIC (see EBCDIC and code pages).

You never see any of this in normal use. It matters when something looks wrong, for example a field that will not accept input, or odd characters.

Where TN3270 fits

TN3270 carries the 3270 data stream over a normal TCP connection using the Telnet protocol, so a phone or laptop can act as a 3270 terminal. See TN3270E for the improved version most hosts use today.

Spotted a mistake? Email [email protected].