Previous Topic Next topic Print topic


VERIFY Function

Purpose

Compares a string with a test string and verifies that all characters appearing in the string also appear in the test string. The verification is done from left to right.

Syntax

VERIFY(s,c,[l])

Parameters

s and c are both either character-string or picture values. l is an optional expression that specifies the location within x where processing begins.

Description

The VERIFY function compares a string s with a test string c and verifies that all characters appearing in the string also appear in the test string. If each of the characters in s occurs in c, the result is 0. If all of the characters in s do not occur in c, the result is a fixed-point binary integer that indicates the leftmost character in s that is not found in c. If only s is null, a 0 is returned. If only c is null, a 1 is returned. If both s and c are null, a 0 is returned.

Examples

VERIFY('2a56b','0123456789')
/* returns the value 2 to indicate the first */
/* non-numeric character in the string '2a56b' */

Restrictions

None.

Previous Topic Next topic Print topic