3270 keyboard mapping for Telnet servers

The topic contains information about 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 control language (CL) program sets the keyboard map for a 327x-type workstation that is using Telnet to go to a IBM® i platform. This program maps the IBM i 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 the message, the rest of the program goes unused in these circumstances.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

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 Change Keyboard Map (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 a IBM i platform. It can also be called automatically at sign-on time by specifying the CHGKBD program for the Initial program parameter on the Change User Profile (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 as follows:

  • Field Plus
  • Field Minus
  • Erase all input fields

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, a virtual machine (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 required PF key.

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 a IBM i platform. If you use HCF to connect to a IBM i platform and then use Telnet to sign on to another IBM i platform from that platform, 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 platforms. Make sure that you use the same keyboard mapping on each platform.