Pathway/iTS TCP and Terminal Programming Guide

Writing User Conversion Procedures
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
4-8
3270 Key Mapping
Declarations for the key-mapping procedure are shown in Figure 4-5.
AID
contains the code transmitted by the attention key (PA4 through PA10). A value for
AID is passed to the procedure.
KEYNUM
contains the Pathway/iTS key number for the SCREEN COBOL program. A value
for KEYNUM is passed on the call and return. KEYNUM is set to -1 if the
Pathway/iTS key number is undefined.
The procedure could include logic to test for the AID byte values represented by keys
PA4 through PA10 and return the appropriate KEYNUM. The logic could test for
KEYNUM value of -1; this value means that the key number is undefined. If
KEYNUM is -1, you should then test the AID byte value:
If the AID byte value indicates a key PA4 through PA10, change KEYNUM to the
appropriate Pathway/iTS key number (31 through 37).
If the AID byte value indicates something other than key PA4 through PA10, merely
return, leaving KEYNUM as -1.
Table 4-1
shows the defined relationships between AID byte values and Pathway/iTS
key numbers.
Figure 4-5. 3270 Key-Mapping Procedure Declaration
PROC USER^3270^KEY^MAPPING ( AID, KEYNUM );
INT AID; ! 3270 AID BYTE -- AID byte from terminal
INT .KEYNUM; ! ON THE CALL -- Associated with 3270 AID
! byte (Table 4-1) or -1 if
! key is undefined
! ON THE RETURN -- Pathway/iTS key number (Figure 4-1)
! or -1 if undefined
Table 4-1. Mapping of Internal 3270 Key Number to Pathway/iTS Key
Number (page 1 of 3)
SCREEN COBOL Special-Name 3270 AID Byte Pathway/iTS Key Number
ENTER %047 0
PA1 %045 1
PA2 %076 2
PA3 %054 3
CLEAR %137 4
PF1 %061 5
PF2 %062 6
* The AID byte value for this key varies from terminal vendor to terminal vendor. Refer to the manual that
came with your terminal for the value.