This variable has meaning only on systems with a mouse. When the user selects a field in the Screen Section, the exact behavior depends on the field's underlying type. The runtime distinguishes between three classes of fields: numeric, numeric-edited, and all others. These are referred to respectively as NUMERIC, EDITED, and ALPHA.

You can control the behavior of the mouse with regard to each of these field types with the MOUSE configuration variable. This variable takes as its arguments one of the field-type names and two keywords. The first keyword defines how the field is selected when the user presses the left button. The second keyword indicates the shape that the mouse pointer should take while in the field. The first keyword can be one of the following:

None Indicates that this type of field may not be selected with the mouse. When this keyword is used, then the second keyword (which defines the mouse's shape) is ignored. The mouse adopts the shape used for areas of the screen that are not part of any field.
Field Indicates that pressing the left button anywhere in the field will cause the cursor to be positioned at the beginning of the field.
Character Indicates that pressing the left button in the field will position the cursor at the character pointed to by the mouse. If this is past the last non-prompt character in the field, the cursor will be placed just after the last non-prompt character.

The second keyword indicates the shape that the mouse pointer should take while in the field. It can be one of the following:

Arrow The mouse pointer appears in the default arrow shape.
Bar The mouse appears as a vertical bar. This is the I-Bar shape typically used to indicate that the mouse can be positioned at a particular character.
Cross The mouse appears as cross-hairs.

You may also define the shape that the mouse will take when it is used in the current field. Because the action of the mouse is the same for all field types once they become the current field, the mouse shape is the same for all three types. You set the desired shape using the Current keyword in the MOUSE configuration variable. The default shape is the Bar shape.

Configuring the MOUSE variable

Depending on where you are setting the MOUSE variable, there are three methods of setting its configuration:

  1. If you want to implement this variable in a configuration file, the variable can be set without using the equals sign. For example:
  2. If you are setting the variable in the Windows environment, the variable would look this:
  3. If you are setting the variable in your program using COBOL syntax, the variable would look like this:

The default configuration is as follows:


You may place multiple entries on the MOUSE configuration line, but you are not required to do so.

The following configuration variables can also be used to set the behavior of the mouse:

To set field selection:


To set cursor shape:


With these variables, you need to set the first and second keywords separately. For example, to change the defaults shown above for a numeric field, you would enter:

Note: This variable cannot be read with the ACCEPT FROM ENVIRONMENT statement.