Bryce, here is what I am atempting, but not working for me.

cls
$fileA = loadfile("c:\ssn.txt")
$fileb = loadfile("c:\data.txt")
$filec = Open(1,"c:\outdata.txt",5)


For Each $line In $fileb
$ssn = substr($line,1,9)

If AScan($filea,"$ssn")+1
? "A SSN In file b was found In file a, writting the line To file c"
$ = WriteLine(1,$line+@CRLF)
EndIf

Function loadfile($file)
DIM $fso,$f,$fs
$fso = CreateObject("Scripting.FileSystemObject")
$f = $fso.GetFile($file)
If @ERROR Exit(2) EndIf
$fs = $f.OpenAsTextStream(1)
$loadfile = Split($fs.Read($f.size),@CRLF)
Exit(@ERROR)
EndFunction


Edited by DMiles (2004-08-16 06:47 PM)