Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
VERIFYR 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 right to left.
Syntax
VERIFYR(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.
Examples
VERIFYR('2a56b','0123456789')
/* returns the value 5 to indicate the first */
/* non-numeric character in the string '2a56b' */
Restrictions
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
-bifpreccompiler option.