VALIDATEFAIL is issued on a DISPLAY statement when a screen contains invalid data and a user uses the Validation Exit key. VALIDATEFAIL is also issued when data inserted into a screen table fails reference checking validation.
A VALIDATEFAIL exception can manage an exception issued for invalid data, but the data occurrences containing invalid values are still present in the set of occurrences available to the rule. The invalid values can be read within the exception handler or a subsequent rule in the same transaction. If the data entered is completely incompatible with the field definitions (for example, alphabetic characters in numeric fields) the invalid values are changed to null.
An example of a VALIDATEFAIL exception accessing screen data follows. The rule displays a screen called NEW_EMPLOYEE for the user to add information about a new employee. If the user exits from the screen while a field has invalid data, the VALIDATEFAIL exception sends the data on the screen to an audit trail.