MochaSoft functionkey mapping

AVV

New Member
We have to change our telnet application for the connection to our MFG/PRO database on our unixbox and with that we have to assign the keyboard mapping again.
Does anyone have experience with Mocha Soft and how to assign the functionkeys? Does anybody happen to have an example on how to?

We use vt220 settings.

Many thanks in advance,

André
 
I have always used PUTTY & Reflectioin. And it kicks in directly. if your emulator is acting funny this might help you.

Defining new keys for PROGRESS in a custom PROTERMCAP file is a basic process. For each key defined, indicate to PROGRESS what function or action is being defined (GO, HELP, INSERT-MODE,etc.). Also indicate the label on the keyboard of the key being defining (F1, F2,F3, etc), and the character
sequence that it sends when pressing the key. For more information on functions and key labels, see the PROGRESS Programming Handbook.

Once the format for an entry in the PROTERMCAP file is known, find out what is sent when the key is pressed. This information is in the terminal's documentation. If the documentation is not handy, see what the key is sending by performing the following steps:

1) Edit a new file -- vi 'any file name'

2) Press i for insert mode.

3) Press Ctrl-v and a ^ appears.

4) Press the key and see what character it sends.

An ESC character in the sequence is represented by a ^[. Even though an ESC in a PROTERMCAP is ^[, it is better to enter it as \E for readability. If the cursor in vi went to the next line when the key was pressed, it is also sending a return at the end of the escape sequence. This is represented in the protermcap file as \r. When representing control characters in the protermcap file, they are entered as a carat (^), followed by the character.


In most European countries, the character set used by their terminals includes non-ASCII characters. Since several competing standards for non-ASCII character sets exist, the standard that the terminal uses must be translated into the Codepage 850 standard, which is what Progress uses. This is done by putting IN and OUT statements in the protermcap file.

Character Sets
Most European languages have some country-specific characters which may or may not be used in other languages. These characters are often referred to as extended characters or "8-bit characters" as they reside in the second part of any character set table with decimal values in the range from 1 to 256.

For example, in Germany, 7 additional characters are included in the alphabet: d, v, |, D, V, \, _ and for Spanish: a, i, m, s, z, q, Q.

The English alphabet often referred to as the US ASCII character set is a subset of all these European alphabets.

The US ASCII characters ("a" to "z", "1" to "10" and a number of symbols) always have the same value and position in any character set table and the value is always a 7-bit code.

Unfortunately this is not the case for "extended" characters. There are several character sets on the market; they are each used on a variety of different terminals and terminal emulation packages. When installing MFG/PRO, be aware of the fact that different character sets may be used in different environments.

Progress internal character set
For sorting and collating data in the data dictionary, Progress uses the character set Codepage 850 which is available on all DOS compatible PC's running DOS 3.3 or above.

Terminal character set
Data input from a terminal or through a terminal emulation package is stored in the database in the character set that the terminal uses unless you modify/use the Protermcap file described later in this document.

Characters stored in the database
As mentioned above, the character set used by Progress to sort and index is Codepage 850; consequently, in order to have "extended" characters sorted correctly, have the data stored in Codepage 850 even though the terminal uses a different character set.

Language releases of MFG/PRO other than English
Translated text (menus, labels, help, messages etc.) is stored in the database in the character set Codepage 850. Most of the translation may be regarded as data in the database just like any other data. Furthermore, there is translated text in the compiled code. Preferably the translation and the data should be stored in the same character set.

Mixed character sets
A character set should be consistent across the database; the same character should not be stored in different character sets. For example the character "" may end up with a decimal value of 130 if the terminal uses the character set Codepage 850 and with a value of 233 if the terminal uses the VT220 character set. To avoid mixed character sets in your database, you can modify the protermcap file as described below. Read Chapter 13 of the Progress Programming Manual for further information about the protermcap file.

Protermcap file
To accommodate the differences in character sets, use two Progress statements, IN and OUT, in the Protermcap file. These statements map the terminal character set to Codepage 850 and vice versa. One IN statement and possibly one OUT statement are required for each key; the IN statement maps whatever value the terminal inputs when pressing an extended character key to the equivalent character in the Codepage 850 character set. The OUT statement does the reverse.

In the following sections are two examples, one for a WY60 terminal and one for a VT220 terminal. The VT220 terminal is an 8-bit terminal; it uses a character set table with 256 characters. The WY60 is a 7-bit terminal; it has only 128 characters available. It uses the same decimal value for different characters, selecting which characters to display depending on what keyboard language is chosen in the terminal configuration.

WY60 protermcap entry
The example is for the German keyboard. Take the following steps to modify the protermcap file for the German language:

1. Find out what the octal values are for the characters to map from on the WY60: d (173), D (133), v (174), V (134), | (175) , \ (135), _ (176).

2. Determine the octal values of the characters which the above characters should be mapped to (normally, but not necessarily Codepage 850): d (204), D (216), v (224), V (231), | (201), \ (232), _ (341). This is the character set that the characters will be stored in in the data dictionary.

3. Use the following syntax to enter a record in the Protermcap file:

:IN(\character)=\character:\

where the first character is the character to map from, and the second character is the character to map to. If the terminal cannot display the character entered, use its octal value as shown in the example.

The OUT statement uses the same syntax. This statement is used if the terminal cannot display a character from the database. For example if the terminal uses a 7-bit character set and the data is stored in an 8-bit character set, map the 8-bit characters to 7-bit characters, or nothing will be displayed on the screen.

4. Enter the records in the Protermcap file:

wy60ge|wy60 in German mode:\_
 
Top