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 right to left.
VERIFYR(s,c,[l])
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.
VERIFYR('2a56b','0123456789') /* returns the value 5 to indicate the first */ /* non-numeric character in the string '2a56b' */
None.
Description
The VERIFYR 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. The verification is done from right to left. 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.
l specifies the location within x where processing begins. Its default value is LENGTH(x).
The precision of the result is determined by the -bifprec compiler option.