Set Membership Functions
Set membership functions determine whether a value is a member of a set. They take a set of numeric arguments or a set of string arguments, and produce Boolean results.
String comparisons are performed according to the rules given for Relational Operators. User-missing string values are treated as valid values.
-
ANY(VALUE, SET [, SET]...)
Returns true ifVALUEis equal to any of theSETvalues, and false otherwise. For numeric arguments, returns system-missing ifVALUEis system-missing or if all the values inSETare system-missing. -
RANGE(VALUE, LOW, HIGH [, LOW, HIGH]...)
Returns true ifVALUEis in any of the intervals bounded byLOWandHIGH, inclusive, and false otherwise.LOWandHIGHmust be given in pairs. Returns system-missing if anyHIGHis less than itsLOWor, for numeric arguments, ifVALUEis system-missing or if all theLOW-HIGHpairs contain one (or two) system-missing values. A pair does not matchVALUEif eitherLOWorHIGHis missing, even ifVALUEequals the non-missing endpoint.