Previous Topic: TRANSLATENext Topic: WEEKDAY


VERIFY

Purpose

Returns the position of the first character in a string value that does not occur in a verification string.

If every character in the input string value occurs in the verification string, a zero is returned.

Syntax

►►─── VERify ( string, verification-string ) ─────────────────────────────────►◄

Parameters

string

Specifies the string value on which the verify function is performed.

String can be:

verification-string

Specifies the string value against whose characters the string value's characters are verified.

Verification-string can be:

Example

In the following example, the verify function is used to verify that WK-NUMBER (PIC X(10)) contains only numeric values or blanks:

Statement:
    IF VER(WK-NUMBER,'0123456789 ') NE 0
      THEN
        DISPLAY TEXT 'INVALID SPECIFICATION FOR NUMERIC FIELD'.

Another example of the verify function is provided in SUBSTRING.