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 (August 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 8 Aug 2005 11:45:23 -0600
Reply-To:     Michael Murff <mjm33@MSM1.BYU.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Murff <mjm33@MSM1.BYU.EDU>
Subject:      Re: optimize address correction
Comments: To: Mark Mullins <mark.l.mullins@REGIONS.COM>
In-Reply-To:  <1123522628.856214.120370@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Mark,

Try loading you dataset autoren1 directly into memory with the sasfile command.

See http://support.sas.com/ctx/samples/index.jsp?sid=453 for an SI example.

HTH,

Michael Murff Provo, UT

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mark Mullins Sent: Monday, August 08, 2005 11:37 AM To: SAS-L@LISTSERV.UGA.EDU Subject: optimize address correction

All, Please see below... any thoughts on how to optimize this program... I am focusing on street correction in this section... processing on roughly 100,000 records is taking several hours on WinXP desktop with 4 GHz and 2 GB ram...

data autoren1; input @1 nam4 $25. @26 nam5 $25.; cards; 0000970LINCOLN RD MONTGOMERY IL 0000481HACKEL DR MONTGOMERY IL P O BOX210807 MONTGOMERY IL 0000094COMMERCE STREET MONTGOMERY IL 3320 ATLANTA HWY MONTGOMERY IL 0002719LOWER WETUMPKA RD.MONTGOMERY IL 329 WEST GLENN AUBURN IL 527 CANAL STREET NEW SMYRNA BEACH IL ; run;

data autoren2 ; set autoren1; drop rec len charone chartwo ii; cityst = nam5; /* STREET SECTION */ if substr(nam4,1,1)= '0' then do; rec = compbl(substr(nam4, verify(nam4, '0'))); *** separate numbers and letters with spaces; len = length(rec); do ii = 1 by 1 until (ii = len-1); charone = (indexc(substr(lowcase(rec), ii, 1), '0123456789') = 1 ); chartwo = (indexc(substr(lowcase(rec), ii+1, 1), '0123456789') = 1); if charone ne chartwo then do; rec = trim(substr(rec, 1, ii))||' '||left(substr(rec,ii+1)); len + 1; end; end; end; else do; rec = compbl(substr(nam4, verify(nam4, '0'))); end; street = rec; run;

comments or suggestions or pointers to other reference material greatly appreciated as usual. thanks!

Mark


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