LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 5 May 2009 13:38:04 -0700
Reply-To:   "Andrew Z." <ahz001@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Andrew Z." <ahz001@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Referencing data set B in data step A's DO loop
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

On May 5, 1:22 pm, "Andrew Z." <ahz...@gmail.com> wrote: > How do I reference the data set 'correct_domains' in the do loop, so I > can look for close Levenshtein distances (to find misspelled domains)? > > data correct_domains; > input domain $200.; > infile datalines truncover; > datalines; > yahoo.com > gmail.com > hotmail.com > aol.com > comcast.net > msn.com > sbcglobal.net > verizon.net > bellsouth.net > cox.net > att.net > ;;;; > run; > > data check_these_domains; > input domain $200.; > infile datalines truncover; > datalines; > yahoo.cm > gmail.co > hotmial.com > aol.com > comcast.net > ;;;; > run;

proc sql; create table matches as select a.domain as correct, b.domain as found from correct_domains a, check_these_domains b where complev(a.domain, b.domain) in (1,2) ; quit;

Found here http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/280fc617d09e8715/4efa2b32e287eee6?lnk=gst&q=COMPLEV#4efa2b32e287eee6

Andrew


Back to: Top of message | Previous page | Main SAS-L page