Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ map3270(5) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tn3270(1)

mset(1)

MAP3270(5)  —  

NAME

map3270 − data base for mapping ASCII keystrokes into IBM 3270 keys

SYNOPSIS

/etc/map3270

DESCRIPTION

When emulating IBM-style 3270 terminals under IBM/4.3 (see tn3270(1)), a mapping must be performed between sequences of keys hit on a user’s (ascii) keyboard, and the keys that are available on a 3270.  For example, a 3270 has a key labeled EEOF which erases the contents of the current field from the location of the cursor to the end.  In order to accomplish this function, the terminal user and a program emulating a 3270 must agree on what keys will be typed to invoke the EEOF function. 

The requirements for these sequences are:

(1)That the first character of the sequence be outside of the standard ascii printable characters;

(2)That no sequence be an initial part of another (although sequences may share initial parts). 

FORMAT

The file consists of entries for various keyboards.  The first part of an entry lists the names of the keyboards which use that entry.  These names will often be the same as in /etc/termcap (see termcap(5)); however, note that often the terminals from various termcap entries will all use the same map3270 entry; for example, both 925 and 925vb (for 925 with visual bells) would probably use the same map3270 entry.  Additionally, there are occasions when the terminal type defines a window manager, and it will then be necessary to specify a keyboard name (via the KEYBD environment variable) as the name of the entry.  After the names, separated by vertical bars (‘|’), comes a left brace (‘{’); the definitions; and, finally, a right brace (‘}’). 

Each definition consists of a reserved keyword (see list below) which identifies the 3270 function (extended as defined below), followed by an equal sign (‘=’), followed by the various ways to generate this particular function, followed by a semi-colon (‘;’).  Each way is a sequence of strings of printable ascii characters enclosed inside single quotes (‘´’); various ways (alternatives) are separated by vertical bars (‘|’). 

Inside the single quotes, a few characters are special.  A caret (‘^’) specifies that the next character is the “control” character of whatever the character is.  So, ‘^a’ represents control-a, ie: hexadecimal 1 (note that ‘^A’ would generate the same code).  To generate rubout (DEL), one enters ‘^?’.  To represent a control character inside a file requires using the caret to represent a control sequence; simply typing control-A will not work.  Note: the ctrl-caret sequence (to generate a hexadecimal 1E) is represented as ‘^^’ (not ‘^\^’). 

In addition to the caret, a letter may be preceded by a backslash (‘\’).  Since this has little effect for most characters, its use is usually not recommended.  For the case of a single quote (‘´’), the backslash prevents that single quote from terminating the string.  For the case of a caret (‘^’), the backslash prevents the caret from having its special meaning.  To have the backslash be part of the string, it is necessary to place two backslashes (’\\’) in the file. 

In addition, the following characters are special:

‘\E’means an escape character;
‘\n’means newline;
‘\t’means tab;
‘\r’means carriage return.

It is not necessary for each character in a string to be enclosed within single quotes. ‘\E\E\E’ means three escape characters.

Comments, which may appear anywhere on a line, begin with a hash mark (‘#’), and terminate at the end of that line.  However, comments cannot begin inside a quoted string; a hash mark inside a quoted string has no special meaning. 

3270 KEYS SUPPORTED

The following is the list of 3270 key names that are supported in this file.  Note that some of the keys don’t really exist on a 3270.  In particular, the developers of this file have relied extensively on the work at the Yale University Computer Center with their 3270 emulator which runs in an IBM Series/1 front end.  The following list corresponds closely to the functions that the developers of the Yale code offer in their product.  In the following list, the starred (∗) functions are not supported by tn3270(1). An unsupported function will cause tn3270(1) to send a (possibly visual) bell sequence to the user’s terminal. 

3270 Key NameFunctional Description
 (∗)LPRTlocal print
   DPdup character
   FMfield mark character
   CURSELcursor select
   CENTSIGNEBCDIC cent sign
   RESHOWredisplay the screen
   EINPerase input
   EEOFerase end of field
   DELETEdelete character
   INSRTtoggle insert mode
   TAB field tab
   BTABfield back tab
   COLTABcolumn tab
   COLBAKcolumn back tab
   INDENTindent one tab stop
   UNDENTundent one tab stop
   NLnew line
   HOMEhome the cursor
   UPup cursor
   DOWNdown cursor
   RIGHTright cursor
   LEFTleft cursor
   SETTABset a column tab
   DELTABdelete a columntab
   SETMRGset left margin
   SETHOMset home position
   CLRTABclear all column tabs
(∗)APLONapl on
(∗)APLOFFapl off
(∗)APLENDtreat input as ascii
(∗)PCONxon/xoff on
(∗)PCOFFxon/xoff off
   DISCdisconnect (suspend)
(∗)INITnew terminal type
(∗)ALTKalternate keyboard dvorak
   FLINPflush input
   ERASEerase last character
   WERASEerase last word
   FERASEerase field
   SYNCHwe are in synch with the user
   RESETreset key-unlock keyboard
   MASTER_RESETreset, unlock and redisplay
(∗)XOFFplease hold output
(∗)XONplease give me output
   ESCAPEenter telnet command mode
   WORDTABtab to beginning of next word
   WORDBACKTABtab to beginning of current/last word
   WORDENDtab to end of current/next word
   FIELDENDtab to last non-blank of current/next
unprotected (writable) field.
    PA1program attention 1
   PA2program attention 2
   PA3program attention 3
    CLEARlocal clear of the 3270 screen
   TREQtest request
   ENTERenter key
    PFK1program function key 1
   PFK2program function key 2
   etc.etc.
   PFK36program function key 36

A SAMPLE ENTRY

The following entry is used by tn3270(1) when unable to locate a reasonable version in the user’s environment and in /etc/map3270:

name {# actual name comes from TERM variable
clear = ´^z´;
flinp = ´^x´;
enter = ´^m´;
delete = ´^d´ | ´^?´;# note that ´^?´ is delete (rubout)
synch = ´^r´;
reshow = ´^v´;
eeof = ´^e´;
tab = ´^i´;
btab = ´^b´;
nl = ´^n´;
left = ´^h´;
right = ´^l´;
up = ´^k´;
down = ´^j´;
einp = ´^w´;
reset = ´^t´;
xoff = ´^s´;
xon = ´^q´;
escape = ´^c´;
ferase = ´^u´;
insrt = ´\E ´;
# program attention keys
pa1 = ´^p1´; pa2 = ´^p2´; pa3 = ´^p3´;
# program function keys
pfk1 = ´\E1´; pfk2 = ´\E2´; pfk3 = ´\E3´; pfk4 = ´\E4´;
pfk5 = ´\E5´; pfk6 = ´\E6´; pfk7 = ´\E7´; pfk8 = ´\E8´;
pfk9 = ´\E9´; pfk10 = ´\E0´; pfk11 = ´\E-´; pfk12 = ´\E=´;
pfk13 = ´\E!´; pfk14 = ´\E@´; pfk15 = ´\E#´; pfk16 = ´\E$´;
pfk17 = ´\E%´; pfk18 = ´\E´; pfk19 = ´\E&´; pfk20 = ´\E∗´;
pfk21 = ´\E(´; pfk22 = ´\E)´; pfk23 = ´\E_´; pfk24 = ´\E+´;
}

IBM 3270 KEY DEFINITONS FOR AN ABOVE DEFINITION

The charts below show the proper keys to emulate each 3270 function when using the default key mapping supplied with tn3270(1) and mset(1).

Type of KeyIBM 3270 KeyDefault Key(s)
 Command KeysEnterRETURN
Clearcontrol-z
 Cursor Movement KeysNew Linecontrol-n or Home
Tabcontrol-i
Back Tabcontrol-b
Cursor Leftcontrol-h
Cursor Rightcontrol-l
Cursor Upcontrol-k
Cursor Downcontrol-j or LINE FEED
 Edit Control KeysDelete Charcontrol-d or RUB
Erase EOFcontrol-e
Erase Inputcontrol-w
Insert ModeESC Space
End InsertESC Space
 Program Function KeysPF1ESC 1
PF2ESC 2
......
PF10ESC0
PF11ESC -
PF12ESC =
PF13ESC!
PF14ESC @
......
PF24ESC +
 
Program Attention KeysPA1control-p 1
PA2control-p 2
PA3control-p 3
 Local Control KeysReset After Errorcontrol-r
Purge Input Buffercontrol-x
Keyboard Unlockcontrol-t
Redisplay Screencontrol-v
 Other KeysErase current fieldcontrol-u

FILES

/etc/map3270

SEE ALSO

tn3270(1), mset(1)
Yale ASCII Terminal Communication System II Program Description/Operator’s Manual (IBM SB30-1911)

BUGS

Tn3270 doesn’t yet understand how to process all the functions available in map3270; when such a function is requested tn3270 will beep at you. 

The definition of “word” (for “word erase”, “word tab”) should be a run-time option.  Currently it is defined as the kernel tty driver defines it (strings of non-whitespace); more than one person would rather use the “vi” definition (strings of specials, strings of alphanumeric). 

PRPQs 5799-WZQ/5799-PFF: IBM/4.3  —  Dec 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026