From what you've said, the key steps are 1) getting rid of duplicate IP
addresses, and 2) merging the files using MATCH FILES BY IP with the /IN
sub-command added to flag the sources of the records. IP addresses that
visited both sites will have both of those flags = 1. Here's an example
using your sample data.
* Read sample data into 2 datasets.
new file.
dataset close all.
data list list / IP (a25).
begin data
**.7.157.50
**.198.151.36
**.255.237.222
**.78.82.128
**.77.16.214
**.41.235.103
**.44.176.201
**.7.17.76
**.61.34.239
end data.
dataset name site1.
data list list / IP (a25).
begin data
**.7.17.75
**.44.141.77
**.100.108.176
**.7.157.50
**.126.10.48
**.44.176.201
**.44.176.201
end data.
dataset name site2.
* Get rid of duplicate IP addresses in first dataset.
dataset activate site1.
sort cases by IP.
match files
file = * /
by IP /
first = firstrec.
select if firstrec. /* get rid of duplicates.
execute.
* Get rid of duplicate IP addresses in second dataset.
dataset activate site2.
sort cases by IP.
match files
file = * /
by IP /
first = firstrec.
select if firstrec. /* get rid of duplicates.
execute.
* Merge the files, matching on IP address.
* Use /IN to flag source of records.
match files
file = 'site1' / in = site1 /
file = 'site2' / in = site2 /
by IP .
execute.
dataset name merged.
* Original datasets not needed, so close them.
dataset close site1.
dataset close site2.
* Compute flag for cases with IP address in both datasets.
* Then format variables, apply labels, and display results.
compute bothsites = site1 and site2.
formats bothsites (f1.0).
value labels site1 site2 bothsites 0 'No' 1 'Yes' .
frequencies site1 site2 bothsites.
* Crosstabs also works well for this.
crosstabs site1 by site2.
HTH.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."