POSITION


POSITION can be used in the image event points (Pre-Display, Option Intercept, Pre-Display/Verify) to position the cursor to either a specific item or a specific row and column position.

    ••••• POSITION ••• •••••••••••••••••••••• ••• (AT APPEARANCE # •••)
    (1)            (2) (3)                    (4)                  (5)

(1) T/F execution conditions

(2) Application ID

(3) Field name or predefined field

(4) Occurrence (constant/index)

(5) Appearance (constant/index)

Using the Statement

To position the cursor to a specific row and column, the designer must leave the application ID, field name, occurrence number, and appearance number blank. If all of the fields are left blank, the POSITION statement positions the cursor to the row and column specified by the CURSOR ROW and CURSOR COLUMN predefined fields, respectively. Note that the CURSOR ROW and CURSOR COLUMN predefined fields refer to the physical row and column of the terminal, rather than to a relative position within the image, window, region, or surface. If the CURSOR ROW or CURSOR COLUMN fields contain a value larger than the size of the terminal, the POSITION statement substitutes the terminal limit for that coordinate. If the CURSOR ROW or CURSOR COLUMN fields contain a negative value, the POSITION statement substitutes 1 for the negative coordinate.

Restrictions

The POSITION statement only affects the cursor position if the image is redisplayed within the same image execution cycle (i.e., if the same image is redisplayed for a higher entry level, or because of a change to the image).

Statement Ignored

If the POSITION statement appears in an invalid event point, it is ignored at runtime. This means that no errors or warnings are generated at compile or runtime because of an invalid context.

Related PDFs

CURSOR COLUMN, CURSOR ROW

Example

In the following example, if the customer's credit limit is zero, the cursor is positioned on this field.

          IF       TAR CUSTOMER CREDIT LIMIT      EQ     0
    T     POSITION TAR CUSTOMER CREDIT LIMIT      (AT APPEARANCE #    )