title Postal code conversion file, STC Dec. 2003 ed. subtitle UT/DLS ed. SPSS control commands 2004/09/03 file handle in / inpipe 'zcat ../pccfNat_DEC03_fccpNat.txt.Z' lrecl=207 data list file=in / pstart 1-2 (a) postcode 1-6 (a) dauid 10-17 rp 10-11 cd 12-13 da 14-17 block 18-19 lat 20-28 (a) long 29-39 (a) sli 40 pr 41-42 cduid 43-46 csd 47-49 csdname 50-119 (a) csdtype 120-122 (a) ccs 123-125 sac 126-128 sactype 129 ctname 130-136 (a) ercode 137-138 dpl 139-142 fed96uid 143-147 uara 148-151 uaratype 152 reppoint 153 pctype 154 commname 155-184 (a) dmt 185 (a) hdmt 186 (a) birthdt 187-194 retiredt 195-202 fed03uid 203-207 * Note: when the 'pstart' code is two digits, the above * data list statement reading in 'pstart' needs to be amended as: * pstart 1-2 (a) * Newfoundland * select if (pstart eq 'A') * Nova Scotia * select if (pstart eq 'B') * Prince Edward Island * select if (pstart eq 'C') * New Brunswick * select if (any(pstart,'E0','E1')) * select if (any(pstart,'E2','E3')) * select if (any(pstart,'E4','E5')) * select if (any(pstart,'E6','E7')) * select if (any(pstart,'E8','E9')) * Quebec east * select if (any(pstart,'G0','G1','G2','G3','G4')) * select if (any(pstart,'G5','G6','G7')) * select if (any(pstart,'G8','G9')) * Montreal * select if (any(pstart,'H0','H1')) * select if (any(pstart,'H2','H3')) * select if (any(pstart,'H4','H5')) * select if (any(pstart,'H6','H7')) * select if (any(pstart,'H8','H9')) * Quebec west * select if (any(pstart,'J0','J1')) * select if (any(pstart,'J2','J3')) * select if (any(pstart,'J4','J5')) * select if (any(pstart,'J6','J7')) * select if (any(pstart,'J8','J9')) * Ontario east * select if (any(pstart,'K0','K1','K2','K3','K4')) * select if (any(pstart,'K5','K6','K7','K8','K9')) * Ontario Central select if (any(pstart,'L0','L1')) * select if (any(pstart,'L2','L3')) * select if (any(pstart,'L4','L5')) * select if (any(pstart,'L6','L7')) * select if (any(pstart,'L8','L9')) * Toronto * select if (any(pstart,'M0','M1')) * select if (any(pstart,'M2','M3')) * select if (any(pstart,'M4','M5')) * select if (any(pstart,'M6','M7')) * select if (any(pstart,'M8','M9')) * Ontario southwest * select if (any(pstart,'N0','N1')) * select if (any(pstart,'N2','N3')) * select if (any(pstart,'N4','N5','N6')) * select if (any(pstart,'N7','N8','N9')) * Ontario north * select if (any(pstart,'P0','P1','P2','P3','P4')) * select if (any(pstart,'P5','P6','P7','P8','P9')) * Manitoba * select if (pstart eq 'R') * Saskatchewan * select if (pstart eq 'S') * Alberta * select if (any(pstart,'T0','T1','T2')) * select if (any(pstart,'T3','T4')) * select if (any(pstart,'T5','T6')) * select if (any(pstart,'T7','T8','T9')) * British Columbia * select if (any(pstart,'V0','V1')) * select if (any(pstart,'V2','V3')) * select if (any(pstart,'V4','V5')) * select if (any(pstart,'V6','V7')) * select if (any(pstart,'V8','V9')) * Northwest Territories, Yukon and Nunavut * select if ((pstart eq 'X') or (pstart eq 'Y')) frequencies variables=rp pstart sort cases by postcode sli (d) birthdt (d) * sort cases by postcode sli (d) aggregate outfile=* / break=postcode / dauid =first(dauid) / rp=first(rp) / cd=first(cd) / da=first(da) / block=first(block) / lat=first(lat) / long=first(long) / sli=first(sli) / pr=first(pr) / cduid=first(cduid) / csd=first(csd) / csdname=first(csdname) / csdtype=first(csdtype) / ccs=first(ccs) / sac=first(sac) / sactype=first(sactype) / ctname=first(ctname) / ercode=first(ercode) / dpl=first(dpl) / fed96uid=first(fed96uid) / uara=first(uara) / uaratype=first(uaratype) / reppoint=first(reppoint) / pctype=first(pctype) / commname=first(commname) / dmt=first(dmt) / hdmt=first(hdmt) / birthd=first(birthdt) / retired=first(retiredt) / fed03uid=first(fed03uid) write outfile='l0.dat' table / postcode dauid to fed03uid execute finish