@polpel:
There're no fewer than 20 different methods of doing this in SAS.
@Reeza has shown you one, perhaps the simplest.
If you have a "huge" base table and a rather short reference list, an inner join could be better since, unlike the @Reeza's subquery, it can hash the list and look it up for every row in the huge table without sorting the latter.
Another option is to stick the keys from the reference table in to a hash table in memory and look it up for every record from the base table in the DATA step.
If your reference list is static and you're going to search it often, perhaps the best option is to create an in/format using the reference file's keys as the in/format input with something like 1 or "1" as the in/format response. Then the in/format can be used in the WHERE clause, be it the DATA step or SQL.
Show samples of your two files, and you can be assured that plenty of folks here will show you concrete ways of how any of the above (and more) can be done.
Kind regards
Paul D.
... View more