You need to Cartesian join the two datasets together and use index() -
This joins all records of set1 and set2 and checks if set2.source contains
set1.excerpt. Since it's a Cartesian join it will grind through all
combinations of the two datasets. If you can include in the join a specific
comparison, like "where zipcode1=zipcode2" it will allow the optimizer to
significantly reduce the processing.
proc sql noprint;
create matches as
from set1, set2
where index(set2.source,set1.excerpt) > 0 ;
good luck -
DDS Data Extraction
From: Haynes, Zac [mailto:ZHaynes@BCBSM.COM]
Sent: Monday, August 25, 2003 11:30 AM
Subject: Ways to code (if Var contains the value of an Obs in another SAS
What are some efficient ways to compute whether a variable ($char80.)
contains the value of one of the observations of another SAS dataset?
Zac Haynes, Systems and Applications Programmer, 714-404-8840.
ISPF Dialog, REXX, Assembler, SAS, Endevor, DB2, SQL, & Macro.