TN3270
IBM 3270 terminals and their emulators get full 3270 screens, with PF keys and, where the terminal has them, graphics. This page covers how the BBS recognises a 3270, the keys, and how it draws pictures.
A 3270 client connects to the telnet listener like any other client. The
BBS asks every client for its terminal type. A client that says
IBM-3278-*, IBM-3279-*, IBM-3277-* or IBM-DYNAMIC is handed to
go3270, which negotiates binary and
end-of-record mode and finds the screen size (from 24x80 up to the model
5's 27x132, or what IBM-DYNAMIC says) and the code page. The caller then
gets the 3270 screens:
| Key | What it does |
|---|---|
| Enter | log on, choose a menu's option (by its letter), select (type S by a line), save |
| PF3 | back, log off |
| PF5 | new user (at the logon); new scan (the areas); read new (in an area); send (in the editor); reply by mail (in a message); change where you call from (the profile) |
| PF6 | post (in an area), new mail (in the mail), add an area (the sysop), your password (the profile) |
| PF7 / PF8 | up / down a page, or the message's text |
| PF4 | reply; messages to you (the areas) |
| PF9 | delete, remove |
| PF10 / PF11 | previous / next message; find messages / scan setup (the areas) |
The key line at the bottom of each screen shows which of these keys it accepts. The screens are the same as the text BBS's (see Development), with the same choices made by PF key instead of by letter.
With tn3270 = no on a listener, 3270s are sent the text BBS instead,
which they cannot show.
3270 graphics¶
When a terminal connects, the BBS reads everything it reports about itself (its query replies) and uses whatever graphics it has:
| Feature | Terminals | Used for |
|---|---|---|
| graphic escape (code page 310) | nearly all: x3270, c3270, wc3270, PCOMM, Vista | the box around the main menu, rules, bar charts in System info; ASCII otherwise; pictures in blocks where there are no vector graphics |
| programmed symbols | IBM PCOMM, HostExplorer, Quick3270 | the logo on the logon screen: the system's name in a pixel font, or tn3270_logo (a PNG), cut into character cells and loaded as a symbol set; pictures where there are no vector graphics |
| vector graphics | PCOMM (host graphics, native protocol), HostExplorer | pictures, in the terminal's own colours, and the logo as a bitmap image instead of symbols (tn3270_vector, on by default) |
Pictures¶
Pictures from the image boards (a post's thumbnail, and the full image) are drawn in the best way the terminal supports, in this order:
- Vector graphics (PCOMM): the picture as bitmaps, a pel for a pixel, error-diffused to the terminal's own palette: PCOMM's 16 colours (its Graphic Color reply), orange, purple, the dark shades and grey among them. Each colour is overpainted: PCOMM's exclusive or does not combine blue with the other colours. The cells under a picture are left empty, and the cursor elsewhere: on PCOMM a character over a picture clears it in its cell.
- Programmed symbols (HostExplorer, Quick3270, PCOMM with vector graphics off): the picture cut into character cells, each cell a symbol, loaded into the terminal's symbol sets before the screen. A set holds 190 symbols, so the picture is as large as its cells fit in the sets there are; a blank cell needs no symbol, and cells alike share one.
- With triple-plane (colour) sets, and the extended Load PS that loads one plane at a time (PCOMM with programmed symbols alone has 3 such sets and 3 single-plane ones): every pel in any of 8 colours, its blue, red and green planes added, the picture error-diffused to them. A cell of several colours goes in a triple-plane set, its planes loaded one by one and shown neutral (X'F7', which shows a cell's planes); a cell of one colour and black goes in a single-plane set in that colour while there is room, saving the colour sets for the rest.
- With single-plane sets alone (PCOMM with vector graphics on as well has 2: 380 cells): each cell one of the 3270's 7 colours, the one nearest its pels, and a symbol of its pels on or off, error-diffused.
tn3270_symbols = no turns them off, for pictures and the logo.
- Blocks (x3270, and any colour 3270 with graphic escape): ▀ ▄ ▌ ▐ █
in the 3270's 7 colours, a cell two pixels by two, each cell the colour
and block nearest its four pixels.
- Words on the rest: [cat.png, 640x480, 52 KB], which every
terminal shows under the picture too.
A caller can turn pictures off and on in their profile (M, or PF11). The profile's terminal line shows how they are drawn.
PCOMM sends its graphics query replies (the Segment reply that says it
has vector graphics, and its colours) only when they are asked for by
name. So the BBS sends a Query List for anything PCOMM's Summary reply
lists that did not come with the first Query. cmd/gfxtest in
go3270 is a 3270 server for trying
vector graphics on an emulator, and it logs every record in both
directions.
Option T of the 3270 main menu, Your terminal, shows what the terminal reported: its code page, cell size, graphic escape, symbol sets and Load PS formats, vector graphics, and every query reply in hex. The log has a line with this for each 3270 that connects. This is the place to start when an emulator does not show the logo.
In PCOMM, programmed symbols and vector graphics need host graphics turned on in the session's configuration, with the native protocol for vector graphics (see PCOMM's 3270 Emulator User's Reference, "Host Graphics"). The formats come from IBM's 3270 Data Stream Programmer's Reference, GA23-0059-07 and Greg Price's 3270 Graphics.
See also: File transfers (IND$FILE), Sixel graphics