3270 screen garbled after changing the model or screen size
A 3270 screen can come out scrambled or stay at 24 x 80 after you change the model. Why the host and the terminal must agree on the size, and what to check.
You change the 3270 model from 2 to 4 or 5 to get a bigger screen. Now the logon screen looks scrambled, fields appear in the wrong place, the bottom of the screen is missing, or everything still fits in 24 x 80. The cause is nearly always that the host and the terminal disagree about the screen size.
Why both sides must agree
A 3270 screen is one long buffer. The host places each field at a buffer address, counted from the top left corner, row after row. The same address is a different row and column on a 24 x 80 screen than on a 27 x 132 screen. If the host builds the screen for one size and the terminal has another, text lands in the wrong place.
The size is agreed when the session starts:
- The client sends its terminal type when it connects, for example
IBM-3278-4-Efor a model 4 with extended attributes. See Screen models and terminal types. - The z/OS TN3270 server turns that terminal type into a VTAM logon mode (logmode) with its
TELNETDEVICEstatements. IBM's sample profile mapsIBM-3278-4andIBM-3278-4-Eto the logmodeSNX32704, model 5 types toSNX32705, and so on. - The logmode tells the application the primary and alternate screen sizes.
The BIND for the session gives a default size and an alternate size. The application switches the screen to the alternate size with an Erase/Write Alternate command; for a model 3, 4 or 5, the larger size is the alternate one.
What to check
- Reconnect after changing the model. The terminal type is only sent when the session connects. A change does nothing to a session that is already logged on, so log off, disconnect and connect again.
- The logmode on the host. If your site sends every session to a fixed logmode, or a logon screen command names one (for example
LOGON APPLID(TSO) LOGMODE(...)), that logmode wins over your terminal type. A model 2 logmode with a model 4 terminal gives you 24 x 80. A logmode for a larger size than your terminal can scramble the screen. Ask the systems programmer which logmode your connection gets, and whether the TN3270 server'sTELNETDEVICEsettings match the model you picked. - A fixed LU. If you connect to one named LU, the host may have given that LU its own logmode. See LU names and device names.
- ISPF still at 24 x 80. Set ISPF's Screen format to Max to use the larger size. See Get a bigger screen in ISPF, Screen format, Terminal type and the model.
- Go back to model 2. If you do not need the extra rows or columns, model 2 (24 x 80) is the safest choice.
Related
- Screen models and terminal types
- Get a bigger screen in ISPF, Screen format, Terminal type and the model
- LU names and device names
- How a 3270 terminal works
- App guide: 3270 (z/OS, VM, VSE)
Sources
- IBM Support: Telnet 3270 Enhanced origins and overview (sample TELNETDEVICE statements and logmodes)
- z/OS Basic Skills: TELNETPARMS statement block (what TELNETDEVICE controls)
- IBM 3270 Data Stream Programmer's Reference, GA23-0059 (buffer addresses; default and alternate sizes set by the BIND and selected by Erase/Write and Erase/Write Alternate)