Data Validation

tablesONLINE has built-in validation for each of its field types, including date fields. Data validation is applied to all fields displayed. In addition to validation based on field type, tablesONLINE offers other forms of data validation.

Edit Pattern Validation

Any alphanumeric field (Display Format X) may require that data conform to a specific pattern. For example, the edit pattern may specify that the first character must be numeric, the second character must be alphabetic and the third character must be the letter Q. If the entered data does not conform to the required pattern, a message will be displayed indicating the correct pattern.

Display Mask

A Display Mask may also be specified for a field. If this is the case, data can be entered in one of two ways:

  • The field is cleared of any existing data and only data (i.e., no mask characters) is entered. The data, if valid, is displayed again with the Display Mask.
  • Data is entered with the Display Mask in place. In this case, care must be taken not to modify the Display Mask. If it is inadvertently modified, it must be corrected or stripped out; failing this, an error will occur.

For more information about Display Masks, see Display Mask.

Initial Value

If the field has an initial value set, then it will appear as the default value when a new row is created. Unless the field is protected, typing over or clearing the entry can override the Initial Value.

Edit Highest Value / Edit Lowest Value

If the Edit Highest Value and Edit Lowest Value fields have been set, the data entered will be validated against an upper and lower bound. If a data outside the bounds is entered, the user receives an error message indicating the limit of the exceeded bound.

Searching Other Tables

Secondary tables may be searched to ensure that the input data exists, does not exist, or is within a range of values. A message is displayed if the search fails, allowing the data to be re-entered. For this type of validation you can use the <PF1> help key to display a list of values that may be selected.

Field Exit Programs

tablesONLINE can also call field exit programs for additional application-specific validation. These exit programs are invoked whenever the fields for which they have been defined are edited.

Exit programs can also be defined and called at points above the field level such as when rows are input and output, for cross-field validation within a row, and at table open, close, and store time.

For detailed information on the creation and use of user exit programs in tablesONLINE/CICS, see the tablesONLINE/CICS Exit Programming Chapter of the tableBASE Programming Guide.