The WHERE clause conditionally selects observations, within the range specification, according to conditions given in the expression. For example, to list the names of all teenage males in the Sashelp.Class
data set, use the following statements:
varNames = {Name Sex Age}; use Sashelp.Class; list all var varNames where(Sex='M' & Age>12);
You can use matrices on the right-hand side of the comparison operator. The following example uses the =* operator to find a string that sounds like or is spelled like certain strings:
list all var varNames where(name=*{"JON","CAROL","JUDI"});