contents.gifindex.gifprev1.gifnext1.gif

6.6 Data Validation

ACUCOBOL-GT includes several mechanisms that instruct the runtime to perform specific types of validation on user supplied data. In instances where an input field is marked for validation, the runtime typically performs data validation when the user attempts to leave the data entry field. Data validation mechanisms include:

gt490000.gif the REQUIRED (EMPTY-CHECK) and FULL (LENGTH-CHECK) phrases of the ACCEPT and Screen Section Screen Description Entry statements (see their respective entries in Reference Manual section 6.4.9).

gt490000.gif the SCREEN CHECK-NUMBERS=Validate option of the KEYBOARD variable (see User's Guide section 4.3.2.1).

gt490000.gif the MSG-VALIDATE event. This message is generated when a user attempts to leave a graphical control.

Although validation is usually performed when the user attempts to leave the field, this is not always the case. Validation is not performed when the ACCEPT terminates as a result of the following:

gt490000.gif an event, except CMD-GOTO and CMD-TABCHANGED

gt490000.gif an exception key, except for keys that move the cursor from field to field in a Screen Section, such as the arrow keys

gt490000.gif a message

The special exceptions noted above (CMD-GOTO, CMD-TABCHANGED, and the arrow keys) are treated as normal termination with regards to validation (they trigger validation), but they also generate their usual exception conditions.