close all set dele on set safe off set excl off If file('doa_growth.dbf') erase doa_growth.dbf EndIf If !file('doa_growth.dbf') create table temp(parcel_no c(20),; value2007 n(10),; value2008 n(10),; inflgrowth n(10),; realgrowth n(10),; realreason c(50),; inflreason c(50)) use temp copy to doa_growth fox2x EndIf clear @10,20 say 'Gathering Growth Info for DOA..' sele a use doa_growth excl zap sele c use reprop set order to realkey sele d use commimp set order to realkey sele e use acessory set order to realkey sele f use mobile set order to repropkey sele g use asmtrsn set order to realkey sele h use defaults If digyr <> 2008 clear @10,20 say 'This routine must be run in the 2008 digest year' @12,20 say 'You are running it in digest year: ' + str(digyr,4,0) close all return EndIf sele b use realprop set order to parcel_no go top Do While !eof() @12,20 say parcel_no If digclass = 'E' or digclass = 'U' skip If !eof() loop Else exit EndIf EndIf If curr_val = prev_val skip If !eof() loop Else exit EndIf EndIf *!* If prev_val = 0 *!* *!* replace realgrowth with curr_val - prev_val *!* *!* skip *!* *!* If !eof() *!* loop *!* Else *!* exit *!* EndIf *!* *!* EndIf rr = ' ' ir = ' ' ls = .f. sele asmtrsn seek realprop.realkey Do While !eof() and realkey = realprop.realkey If coa_type <> 'I' If len(alltrim(rr)) = 0 rr = 'REAL - ' + reason EndIf EndIf If coa_type = 'I' If len(alltrim(ir)) = 0 ir = 'INFL - ' + reason EndIf EndIf *!* If coa_type = 'S' *!* *!* ls = .t. *!* exit *!* *!* EndIf skip EndDo *!* If realprop.parcel_no ='012 002 ' *!* ?realprop.curr_val *!* ?realprop.prev_val *!* wait *!* endIf If len(alltrim(rr)) > 0 sele asmtrsn seek realprop.realkey Do While !eof() and realkey = realprop.realkey If coa_type <> 'I' sele doa_growth append blank replace parcel_no with realprop.parcel_no,; value2007 with realprop.prev_val,; value2008 with realprop.curr_val,; realreason with asmtrsn.reason &&,; * inflreason with ir &&,; sele asmtrsn EndIf skip EndDo EndIf *!* inflgrowth with iif(realprop.digclass = 'V' or ls,0,realprop.curr_val - realprop.prev_val),; *!* realgrowth with iif(realprop.digclass = 'V' or ls,realprop.curr_val - realprop.prev_val,0) *!* If ls or realprop.digclass = 'V' *!* *!* sele realprop *!* skip *!* *!* If !eof() *!* loop *!* Else *!* exit *!* EndIf *!* *!* EndIf *!* *!* *!* sele reprop *!* seek realprop.realkey *!* *!* If found() *!* Do While !eof() and realkey = realprop.realkey *!* Do Case *!* Case occupancy <> 4 *!* If yr_built = defaults.digyr - 1 *!* If ovr_val > 0 *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - ovr_val,; *!* doa_growth.realgrowth with ovr_val + doa_growth.realgrowth *!* Else *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - timp_val,; *!* doa_growth.realgrowth with timp_val + doa_growth.realgrowth *!* EndIf *!* EndIf *!* Case occupancy = 4 *!* sele mobile *!* seek repropkey *!* If found() *!* If val(yearbuilt) = defaults.digyr - 1 *!* If ovrvalue > 0 *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - ; *!* (ovrvalue+addonval),doa_growth.realgrowth with ovrvalue + ; *!* addonval + doa_growth.realgrowth *!* Else *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - ; *!* (value+addonval),doa_growth.realgrowth with value + ; *!* addonval + doa_growth.realgrowth *!* EndIf *!* EndIf *!* sele reprop *!* EndIf *!* EndCase *!* skip *!* EndDo *!* EndIf *!* *!* sele commimp *!* seek realprop.realkey *!* If found() *!* Do While !eof() and realkey = realprop.realkey *!* If val(yr_bilt) = defaults.digyr - 1 *!* If comimpovr > 0 *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - comimpovr,; *!* doa_growth.realgrowth with comimpovr + doa_growth.realgrowth *!* Else *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - bldg_val,; *!* doa_growth.realgrowth with bldg_val + doa_growth.realgrowth *!* EndIf *!* EndIf *!* skip *!* EndDo *!* EndIf *!* sele acessory *!* seek realprop.realkey *!* If found() *!* Do While !eof() and realkey = realprop.realkey *!* If val(year_built) = defaults.digyr - 1 and acc_type = 'A' *!* If ovr_val > 0 *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - ovr_val,; *!* doa_growth.realgrowth with ovr_val + doa_growth.realgrowth *!* Else *!* replace doa_growth.inflgrowth with doa_growth.inflgrowth - imp_val,; *!* doa_growth.realgrowth with imp_val + doa_growth.realgrowth *!* EndIf *!* EndIf *!* skip *!* EndDo *!* EndIf *!* *!* sele doa_growth *!* replace realgrowth with value2008 - inflgrowth sele realprop skip EndDo close all use doa_growth copy to doa_growth delimited close all clear @10,20 say 'Locating 2007 sales...' If !file('doa_sales.dbf') create table temp(parcel_no c(20),; saleprice n(11),; saledate d) use temp copy to doa_sales fox2x EndIf sele a use realprop set order to parcel_no go top sele b use saleinfo set order to realkey sele c use doa_sales excl zap sele realprop Do While !eof() @12,20 say parcel_no sele saleinfo seek realprop.realkey Do While !eof() and realkey = realprop.realkey If year(saledate) = 2007 and saleprice > 1000 sele doa_sales append blank replace parcel_no with realprop.parcel_no,; saleprice with saleinfo.saleprice,; saledate with saleinfo.saledate sele saleinfo EndIf skip EndDo sele realprop skip EndDo sele doa_sales copy to doa_sales delimited close all clear @10,20 say 'Collecting MH Info' If !file('doa_mh.dbf') create table temp(parcel_no c(20),; mobtype c(1)) use temp copy to doa_mh fox2x Else use doa_mh excl zap EndIf sele a use doa_mh index on parcel_no to xa sele b use realprop set order to parcel_no go top sele c use reprop set order to realkey sele d use mobile set order to prebmapid sele realprop Do while !eof() @12,20 say parcel_no sele reprop seek realprop.realkey Do while !eof() and realkey = realprop.realkey If occupancy = 4 sele doa_mh append blank replace parcel_no with realprop.parcel_no,; mobtype with 'N' exit EndIf skip EndDo sele mobile seek realprop.parcel_no Do while !eof() and prebmapid = realprop.parcel_no If mobtype = 3 sele doa_mh append blank replace parcel_no with realprop.parcel_no,; mobtype with 'P' EndIf skip EndDo sele realprop skip EndDo sele doa_mh copy to doa_mh delimited close all clear @10,20 say 'Process is finished...' @12,20 say 'Doa_growth.txt, doa_mh.txt and doa_sales.txt can be located in the following folder ' @14,20 say curdir() return