Created On:  24 April 2012

Problem:

The default behavior on a screen form is to type data in the form using lower-case and upper-case text at the same time. In some cases, it is necessary to force the use of upper-case (or lower-case) only.

Resolution:

Adding the UPPER (or LOWER) property to the definition of a screen control is one method of accomplishing this.
However, this requires the program to be recompiled.

An alternative solution that does not require compiling is to configure some environment variables.

For character screens, use this environment variable:

KEYBOARD case=lower
or
KEYBOARD case=upper

For graphical screens, the KEYSTROKE environment variable allows you to remap lower-case to upper-case, or vice versa.

For example:
KEYSTROKE data=65 97    <- this will transform the edited 'a' in 'A'
KEYSTROKE data=66 98    <- this will transform the edited 'b' in 'B'
KEYSTROKE data=67 99    <- this will transform the edited 'c' in 'C'
and so on, following the ASCII table.

To have only lower case, data must be inverted:
KEYSTROKE data=97 65    <- this will transform the edited 'A' in 'a'

Incident #2261080