3270 keyboard mapping for Telnet servers

This topic helps you to understand keyboard mapping for support of 3270 emulation.

The following table shows the default PF key assignments to perform the various 5250 functions. You can use the Display Keyboard Map (DSPKBDMAP) command to see the current keyboard mapping. Or, you can use option 6 (Display 3270 keyboard map) on the Configure TCP/IP Telnet Menu, while your terminal is in 3270 emulation mode.

Table 1. Default PF key assignments
5250 function key Default 3270 keys to select function
Help PF1
3270 Help PF2
Clear PF3
Print PF4
Display Embedded Attributes PF5
Test Request PF6
Roll Down PF7
Roll Up PF8
Error Reset PF10 or Enter
Sys Req PF11
Record Backspace PF12
F1 through F12 Press PA1, then one of the following: PF1 through PF12
F13 through F24 Press PA2, then one of the following: PF1 through PF12 or PF13 through PF24 (if present)
Field Exit Erase EOF, then Field Tab
Attention For 3277 use Test Request, then PA1. For 3278/3279 use ATTN key

The following example CL program sets the keyboard map for a 327x-type workstation that is using Telnet to go to an iSeries™ server. This program maps the iSeries function keys to their equivalent function keys on the 327x workstation. If you attempt to run a CHGKBDMAP command from a workstation not in 3270 emulation mode, you will receive the CPF8701 message. By monitoring it, the rest of the program goes unused in these circumstances.

PGM
MONMSG      MSGID(CPF8701 CPF0000)
CHGKBDMAP   PF1(*F1) PF2(*F2) PF3(*F3) PF4(*F4) PF5(*F5) 
PF6(*F6) PF7(*DOWN) PF8(*UP) PF9(*F9)
PF10(*F10) PF11(*F11) PF12(*F12)
PA1PF1(*HELP) PA1PF2(*HLP3270)
PA1PF3(*CLEAR) PA1PF4(*PRINT)
PA1PF5(*DSPATR) PA1PF6(*TEST) PA1PF7(*F7)
PA1PF8(*F8) PA1PF9(*ATTN) PA1PF10(*RESET)
PA1PF11(*SYSREQ) PA1PF12(*BCKSPC)
ENDPGM

By storing this CL source as part of the QCLSRC file in library TCPLIB as member CHGKBD, you can create the CL program CHGKBD into the TCPLIB library by using the following CL command:

CRTCLPGM PGM(TCPLIB/CHGKBD) SRCFILE(TCPLIB/QCLSRC)  
TEXT('Change the keyboard mapping for 327x terminals')  

The CHGKBD program can then be called by anyone using Telnet to an iSeries server. It can also be called automatically at sign-on time by specifying the CHGKBD program for the Initial program parameter on the CHGUSRPRF command, or the CHGKBD program can be called by the profile's initial program.

PA1 and PA2 keys on a PC keyboard

The PA1 and PA2 keys do not appear on a PC keyboard. A keyboard map in your 3270 emulator provides the function of these 3270 keys on a PC keyboard.

The default 3270 Telnet keyboard map uses these keys. Therefore, it is important that you know where these keys are on the keyboard before starting a 3270 Telnet session. This is especially important if you are planning to start a session without changing the keyboard mapping. You should refer to your emulator documentation for the keys or keystrokes required to provide these functions.

There are some 5250 key sequences for which there is no supported 3270 key sequence and, therefore, it is not possible to set these keyboard commands on a 3270. These key sequences are:

The 5250 Field Exit Key function is performed on a 3270 keyboard using the Erase EOF key and then the tab key.

Special circumstances

When using Telnet 3270 full-screen mode from the 3270 terminal and before the default mapping for the terminal is changed, the keys PF1 to PF12 might be emulated by the key sequence PA1 PFx. Therefore, instructions like Press PF3 or Press PF4 should read: Press PA1 PF3 and Press PA1 PF4, before creating a new keyboard map.

Depending on the installation of the Telnet client for the host for example VM Telnet client, when pressing PA1, the user might get the instruction TELNET command: at the bottom line of the display. If the system displays this instruction type: PA1, press the Enter key; move the cursor to the command line; and press the desired PF key. In this case, the following commands can emulate PF1 to PF12:

  1. Press PA1, get the Telnet instruction TELNET command .
  2. Type PA1, press the Enter key.
  3. Move the cursor to the command line.
  4. Press the desired PF key.

For additional keyboard mapping information, see Appendix D. TELNET 3270 Keyboard Mappings.

Note: The Host Command Facility (HCF) is a feature available on System/370™ , 43xx, and 30xx host systems. This feature enables a user on the host system to use applications on an iSeries server. If you use HCF to connect to an iSeries server and then use Telnet to sign on to another iSeries server from that iSeries server, you are in a 3270 full-screen mode session. The keyboard maps twice, once for the initial HCF session and once for the Telnet session. To use your PF keys the way you normally would, you must change the keyboard mapping on both iSeries server. Make sure that you use the same keyboard mapping on each iSeries server.
Related concepts
Start a 3270 Telnet client session