In reply to C Bodily.

You can use the SUBSTR function to compare the first few characters to a string. For example, to exclude all names that begin with "Ja" (such as James, Jane, and Janet) use the following statements:

proc print data=sashelp.class;
where substr(Name, 1, 2) ^= "Ja";
var name;
run;