VERIFY Function

Returns the position of the first character in a string that is not in any of several other strings.

Category: Character
Restriction: I18N Level 0 functions are designed for use with Single Byte Character Sets (SBCS) only.
Tip: DBCS equivalent function is KVERIFY.

Syntax

VERIFY(source,excerpt-1<, …, excerpt-n> )

Required Arguments

source

specifies a character constant, variable, or expression.

excerpt

specifies a character constant, variable, or expression. If you specify more than one excerpt, separate them with a comma.

Details

The VERIFY function returns the position of the first character in source that is not present in any excerpt. If VERIFY finds every character in source in at least one excerpt, it returns a 0.

Example

The following SAS statements produce this result.
SAS Statement
Result
data scores;
   input Grade : $1. @@;
   check='abcdf';
   if verify(grade,check)>0 then 
      put @1 'INVALID ' grade=;
   datalines;
a b c b c d f a a q a b d d b
;
INVALID Grade=q

See Also

Functions: