Key Interpretation

When the user presses a key, the keyboard sends a signal to the computer. This signal needs to be interpreted and translated into a value, or functionality, that the COBOL program can understand. This process begins with the terminal database file.

The terminal database file equates hardware signals to logical values. Unless you are running on a system such as Windows, where the key interpretation is built into the runtime, your terminal needs to be listed in the terminal database file. Keystrokes at the terminal generate hardware signals, and each hardware signal must be equated to a logical value if the application program is to respond to the associated keystroke. These logical values, called key codes, are listed in the Table of Keys in Table of Keys.

We provide the definitions for many popular terminals in the terminal database file that we send you. If the name of your terminal is included, you will not need to change anything unless your particular terminal is different from the standard configuration for its type. If that is the case, you may need to change the entry.

Each entry in the terminal database file consists of the name of the terminal (including all names by which you might typically refer to this terminal type), followed by a series of character strings. Some of these strings are equations that assign hardware signals from the keyboard to key codes that we provide. Some of the strings consist of functional instructions to the terminal.

Terminal database file entries and the syntax rules that govern them are described in The Terminal Database File.