Support 805.461.7300
Sales
Our Technology. Your Success.

Parse Address Command

Make sure the address, city, state, and ZIP Code information is in the field named Address. Nothing is in city, st, or zip.

Pull down the Edit menu to Command, then run this command:
replace all address with reduce(address)
replace all address with ALLT(address)+" "+ALLT(city),city with ""
use in iif(used('_uszips'),select('_uszips'),0) 
replace zip with allt(substr(address,rat(" ",allt(address)))),; 
   address with left(address,rat(" ",allt(address))); 
   for empty(zip) and isdigit(right(allt(address),1)) 
replace address with allt(address)+" "+zip,; 
   zip with "" for isalpha(allt(zip)) 
public comalias 
comalias=alias() 
use (addbs(xDefFldr)+"dmm\_uszips.dbf") in 0 order uszip 
replace city with _uszips.prefcity,; 
   st with _uszips.st for seek(left(zip,5),'_uszips') 
use in iif(used('_uszips'),select('_uszips'),0) 
replace address with left(address,rat(left(city,4),upper(address))-1) ; 
   for !empty(city) and rat(left(city,4),upper(address))>0 
replace city with allt(substr(address,rat(" ",allt(address),2))) for (empty(city) ; 
   or allt(st) $ address) 
replace address with strtran(address,allt(city)) for allt(city) $ address and !empty(city) 
replace address with allt(address)+" "+city for !" " $ allt(address) 
replace city with "" for allt(city) $ address and !empty(city) 
release comalias

« Back to Commands

I am especially motivated to take time to draw attention to Vince. In two instances, we potentially faced loss of product – significant loss, but thanks to everyone’s efforts, most notably Vince’s, we ended up with minor re-work and zero loss of stock. He’s patient and thorough, knowledgeable and resourceful. And he’s patient – A Big Plus when dealing with me. Long story short, the guy was able to not only produce a solution, but to prove to me the veracity of it. I hung up the phone saving thousands of dollars in catalog stock, not lost but salvaged, and my department had to spend just a wee bit of time on job re-work (which I was happy to do, all things considered). But I also hung up with a peculiar urge to write about Vince, incongruent as that may be since I rarely am moved to write letters of this sort. So… In a time of crisis, Vince was a terrific asset and ally. If I were his boss, I’d attempt a merit raise authorization, he was that exceptional.
H.D., Shawnee Mission, KS