title Postal code conversion file: DHC, OHA and PHU codes subtitle UT/DLS ed. SPSS control commands 09/1998, rev. 09/2000 file handle in / inpipe='zcat /datalibrary/datalib/cstdli/pccf/pccf_jun00/pccf35_JUN00.txt.Z' / lrecl=183 data list file=in / postcode 1-6 (a) rp 7-8 fed87 9-11 ea87 12-14 lat 15-23 long 24-34 sli 35 rp2 36-37 rp3 38-39 cd 40-41 csdcode 42-44 csdname 45-101 (a) csdtype 102-104 (a) ccs 105-107 cma 108-110 cmatype 111 (a) pcma 112-114 pcmatype 115 (a) ctname 116-122 ercode 123-124 dpl 125-127 rp4 128-129 fed96 130-132 rurban 133 rpf 134 pct 135 commname 136-165 (a) dmt 166 (a) hdmt 167 (a) birth 168-175 (a) retire 176-183 (a) format ctname (f7.2) comment Recode CDs into District Health Councils (16) comment See also: http://www.seo-dhc.org/ recode cd (58 thru 60=1) (56 thru 57=2) (51 thru 53=2) (44=3) (48 thru 49=3) (54=3) (1=4) (2=4) (6=4) (47=4) (7=5) (9 thru 13=5) (28 thru 29=6) (22 thru 23=7) (30=7) (31=8) (40 thru 42=8) (36 thru 38=9) (21=10) (24=10) (19=11) (43=11) (14 thru 16=12) (18=12) (46=12) (25=13) (20=14) (26=15) (32=16) (34=16) (39=16) (else = 99) into ndhc string ndhcname (a50) comment Assign a name variable to District Health Councils (16) recode ndhc (1= 'Northwestern Ontario') (2= 'Algoma, Cochrane, Manitoulin & Sudbury') (3= 'Muskoka,Nipissing,Parry Sound & Timiskaming') (4= 'Champlain') (5= 'Quinte,Kingston,Rideau') (6= 'Grand River') (7= 'Waterloo Region-Wellington-Dufferin') (8= 'Grey,Bruce,Huron,Perth') (9= 'Essex,Kent,Lambton') (10= 'Halton-Peel') (11= 'Simcoe-York') (12= 'Durham, Haliburton, Kawartha & Pine Ridge') (13= 'Hamilton-Wentworth') (14= 'Metropolitan Toronto') (15= 'Niagara Region') (16= 'Thames Valley') into ndhcname / comment Recode CDs into Ontario Health Areas (23) comment Used in Ontario Health Survey only compute oha eq 9996 if ((rp eq 35) and (cd eq 6)) oha eq 3511 if ((rp eq 35) and (any(cd,2,1,47))) oha eq 3512 if ((rp eq 35) and (any(cd,10,11,7,9,12,13))) oha eq 3513 if ((rp eq 35) and (any(cd,14,15,16,46))) oha eq 3521 if ((rp eq 35) and (cd eq 18)) oha eq 3522 if ((rp eq 35) and (cd eq 21)) oha eq 3523 if ((rp eq 35) and (cd eq 20)) oha eq 3524 if ((rp eq 35) and (cd eq 19)) oha eq 3525 if ((rp eq 35) and (cd eq 43)) oha eq 3526 if ((rp eq 35) and (cd eq 24)) oha eq 3527 if ((rp eq 35) and (cd eq 26)) oha eq 3531 if ((rp eq 35) and (cd eq 25)) oha eq 3532 if ((rp eq 35) and (any(cd,28,29))) oha eq 3533 if ((rp eq 35) and (any(cd,22,23))) oha eq 3534 if ((rp eq 35) and (cd eq 30)) oha eq 3536 if ((rp eq 35) and (cd eq 37)) oha eq 3541 if ((rp eq 35) and (any(cd,36,38))) oha eq 3542 if ((rp eq 35) and (any(cd,32,34,39))) oha eq 3543 if ((rp eq 35) and (any(cd,31,40,41,42))) oha eq 3544 if ((rp eq 35) and (any(cd,56,57))) oha eq 3551 if ((rp eq 35) and (any(cd,51,52,53))) oha eq 3552 if ((rp eq 35) and (any(cd,44,48,49,54))) oha eq 3553 if ((rp eq 35) and (any(cd,58,59,60))) oha eq 3561 comment Recode CDs into Public Health Units (37) comment Source: Central East Health Information Partnership comment See also: http://alphaweb.org/phunit/ recode cd (1 thru 2=2258) (6=2251) (7 thru 9=2243) (10 thru 11=2241) (12 thru 13=2238) (14=2235) (15=2255) (16=2235) (18=2230) (19=2270) (20=3895) (21=2253) (22 thru 23=2266) (24=2236) (25=2237) (26=2246) (28=2234) (29=2227) (30=2265) (31=2254) (32=2252) (34=2231) (36=2240) (37=2268) (38=2242) (39=2244) (40=2239) (41 thru 42=2233) (43=2260) (44=2245) (46=2235) (47=2257) (48=2247) (49=2245) (51 thru 53=2261) (54=2263) (56=2256) (57=2226) (58=2262) (59 thru 60=2249) (else=9999) into ophu. Recode csdcode (20004=2264) (20001=2259) (20006=2229) (20008=2250) (20014=2269) (20019=2232) into ophu variable labels postcode 'Postal code'/ rp rp2 rp3 'Region and province (1987 representation order)' fed87 'Federal electoral district (1987 representation order)' ea87 'Enumeration area (1987 representation order)' lat 'Latitude' long 'Longitude' sli 'Single link indicator' cd 'Census division unique identifier' csdcode 'Census subdivision code' csdname 'Census subdivision name' csdtype 'Census subdivision type' ccs 'Census consolidated subdivision code' cma 'Census metropolitan area/census agglomeration code' cmatype 'Census metropolitan area/census agglomeration type' pcma 'Primary census metropolitan area/census agglomeration code' pcmatype 'Primary census metropolitan area/census agglomeration type' ctname 'Census tract name' ercode 'Economic region code' dpl 'Designated place code' rp4 'Region and province (1996 representation order)' fed96 'Federal electoral district (1996 representation order)' rurban 'Enumeration area urban/rural type' rpf 'Representative point flag' pct 'Postal code type' commname 'Community name' dmt 'Delivery mode type' hdmt 'Historical delivery mode type' birth 'Birth date' retire 'Retired date' ndhc 'Ontatio district health unit (16)' ndhcname 'Ontatio district health unit name' oha 'Ontario health area, 1996 (23)' ophu 'Ontario public health unit, 1996 (40)' value labels rp rp2 rp3 10 'Newfoundland' 11 'Prince Edward Island' 12 'Nova Scotia' 13 'New Brunswick' 24 'Quebec' 35 'Ontario' 46 'Manitoba' 47 'Saskatchewan' 48 'Alberta' 59 'British Columbia' 60 'Yukon Territory' 61 'NWT'/ sli 0 'additional record' 1 'best/only record' / cmatype 'A' 'consolidated CMA' 'B' 'regular CMA' 'C' 'consolidated CA' 'D' 'regular CA' / pcmatype 'E' 'PCMA' 'F' 'PCA' / rurban 1 'urban core' 2 'urban fringe' 3 'rural fringe' 4 'urban,outside CMA/CA' 5 'rural,outside CMA/CA' / rpf 1 'bf rep point,SNF' 2 'EA rep point,SNF' 3 'EA rep point,non-SNF' 4 'historic bf rep point' / pct 1 'street w carrier' 2 'street w route service' 3 'post office box' 4 'route service' 5 'general delivery' 0 'unknown' / ndhc 1 'Northwestern Ontario' 2 'Algoma, Cochrange, Manitoulin & Sudbury' 3 'Muskoka,Nipissing,Parry Sound & Timiskaming' 4 'Champlain' 5 'Quinte,Kingston,Rideau' 6 'Grand River' 7 'Waterloo Region-Wellington-Dufferin' 8 'Grey,Bruce,Huron,Perth' 9 'Essex,Kent,Lambton' 10 'Halton-Peel' 11 'Simcoe-York' 12 'Durham, Haliburton, Kawartha & Pine Ridge' 13 'Hamilton-Wentworth' 14 'Metropolitan Toronto' 15 'Niagara Region' 16 'Thames Valley' / oha 3511 'Ottawa,Carleton' 3512 'Prescott,Rus,Sotr,Dund,Glen,Renf' 3513 'Lanark,Leed,Gren,Hast,PE,Pront,Lenx' 3521 'Northumb,Vict,Halib,Peterb' 3522 'Durham' 3523 'Peel' 3524 'metro Toronto' 3525 'York' 3526 'Simcoe' 3527 'Halton' 3531 'Niagara' 3532 'Hamilton-Wentworth' 3533 'Brant,Haldiman,Norfolk' 3534 'Wellington,Dufferin' 3536 'Waterloo' 3541 'Essex' 3542 'Lambton,Kent' 3543 'Elgin,Middlesex,Oxford' 3544 'Bruce,Grey,Perth,Huron' 3551 'Algoma,Cochrane' 3552 'Manitoulin,Sudbury' 3553 'Timiskaming,Muskoka,ParryS,Nipissing' 3561 'ThunderBay,Kenora,Rainy River' 9996 ' not applicable' / ophu 2226 'Algoma HU' 2227 'Brant County HU' 2229 'East York HU' 2230 'Durham Regional HU' 2231 'Elgin-St. Thomas HU' 2232 'Etobicoke City HU' 2233 'Bruce-Grey-Owen Sound HU' 2234 'Haldimand-Norfolk Regional HU' 2235 'Haliburton,Kawartha,Pine Ridge HU' 2236 'Halton Regional HU' 2237 'Hamilton-Wentworth Regional HU' 2238 'Hastings & Prince Edward HU' 2239 'Huron County HU' 2240 'Kent-Chatham HU' 2241 'Kingston,Frontenac & Lennox & Addington HU' 2242 'Sarnia-Lambton HU' 2243 'Leeds,Grenville-Lanark HU' 2244 'Middlesex-London HU' 2245 'Muskoka-Parry Sound HU' 2246 'Niagara Regional HU' 2247 'North Bay & District HU' 2249 'Northwestern HU' 2250 'North York HU' 2251 'Ottawa-Carleton Regional HU' 2252 'Oxford County HU' 2253 'Peel Regional HU' 2254 'Perth District HU' 2255 'Peterborough County-City HU' 2256 'Porcupine HU' 2257 'Renfrew County and District HU' 2258 'Eastern Ontario HU' 2259 'Scarborough HU' 2260 'Simcoe County HU' 2261 'Sudbury & District HU' 2262 'Thunder Bay District HU' 2263 'Timiskaming HU' 2264 'Toronto HU' 2265 'Waterloo HU' 2266 'Wellington-Dufferin HU' 2268 'Windsor-Essex County HU' 2269 'York HU' 2270 'York Regional HU' 3895 'Toronto HU'. frequencies variables=cd ndhc ndhcname oha ophu temporary select if (cd gt 60) list variables=rp3 postcode cd sample .0001 list variables=cd ndhc ndhcname oha ophu / cases from 1 to 100 execute finish