VALNUM (Validate Numeric) keyword for display files

You use this file-level, record-level, or field-level keyword to enhance the error checking that is performed against fields with the data type numeric-only.

When specified on a numeric only field, this keyword causes an error message to be returned if the user attempts to embed a SPACE, PLUS SIGN or MINUS SIGN between numeric digits in the field or when the PLUS SIGN or MINUS SIGN precedes the numeric digits.

This keyword has no parameters.

The field containing the VALNUM keyword must be defined as an input-capable field with the data type Y.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the VALNUM keyword:

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD
00020A            F1             5Y 0B  3  4VALNUM
00030A            F2             5Y 0B  4  4

In this example, field F1 does not allow the user to embed a space, plus sign, or minus sign within the numeric value, nor to precede the numeric value with a plus sign or minus sign. Field F2 is treated as described in Data type and keyboard shift for display files (position 35).