BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

Hello,

 

I wonder if someone already transfer on its server those two files from Post Canada:

 

canada.add 

canada.arc

and if so , what can we do with those two files and SAS.

 

I know that my question seem a bit strange but we have an old process that deposit those two files on our server but I have no idea who use those files or what to do with it.

 

Can we use SAS and those two file to generate a postal code dataset?

8 REPLIES 8
Reeza
Super User
I believe the file that Canada Post provides is called a PCCF file or maybe it's Stat Can?
Do you have a record layout?
alepage
Barite | Level 11

to be honest, I don't know how to use those files.  Which software can I use to look at those file?

alepage
Barite | Level 11
I have open canada.arc with notepad++ and here's what I see


COMMISSION DE LA CONSTRUCTION DU QUEBEC COMMISSION DE LA CONSTRUCTION DU QU*BEC
COMMISSION DE LA CONSTRUCTION DU QUEBEC (CCQ) COMMISSION DE LA CONSTRUCTION DU QU*BEC (CCQ)
COOPERATIVE GRIFFIN COOP*RATIVE GRIFFIN
A ANTONIO-PARENT = ANTONIO-PARENT
A ARSENE = ARS>NE
A BARRIAULT = BARRIAULT
A BEDARD = B*DARD
A BONFILS = BONFILS
A BONSFILS = BONSFILS
A BOUCHARD = BOUCHARD
A CAIF = CA?F
A CHARLES = CHARLES
A CLOPHA = CLOPHA
A COEUR = COEUR
A DAMAS = DAMAS
A. DE LA CHEVROTIERE LTEE A. DE LA CHEVROTIERE LT*E
A DEA = DEA
A DUBE = DUB*
A GIGNAC = GIGNAC
A GODIN = GODIN
A GRAND-PAPA = GRAND-PAPA
A HIPPOLYTE = HIPPOLYTE
A JOS = JOS
A LESSARD = LESSARD
A MARICHON = MARICHON
A MATHIEU = MATHIEU
A MICHEL = MICHEL
A MOGENE = MOG>NE
A NOE = NO*
A PICOTE = PICOT*
A PIERRE = PIERRE
A. SETLAKWE LTEE A. SETLAKWE LT*E
A TOM = TOM
A TOMMY = TOMMY
alepage
Barite | Level 11
the file canada.add open with excel give me something like below:


52ABABEE ABEE PO ABEE 000000T0A0A0T0A0A0
32ABABEE ABEE PO 00120 ABEE 00001 000000T0A0A0T0A0A0
32ABABEE ABEE PO 99905 ABEE 99900 000000T0A0E1T0A0A0
52ABACADIA VALLEY ACADIA VALLEY PO ACADIA VALLEY 000000T0J0A0T0J0A0
32ABACADIA VALLEY ACADIA VALLEY PO 00210 ACADIA VALLEY 00001 000000T0J0A0T0J0A0
32ABACADIA VALLEY ACADIA VALLEY PO 99905 ACADIA VALLEY 99900 000000T0J0B2T0J0A0
52ABACME ACME PO ACME 000000T0M0A0T0M0A0
42ABACME ACME PO RR0001 ACME 000000T0M0A0T0M0A0
42ABACME ACME PO RR0999 ACME 000000T0M0A0T0M0A0
32ABACME ACME PO 00600 ACME 00001 000000T0M0A0T0M0A0
32ABACME ACME PO 01044 ACME 01000 000000T0M0A0T0M0A0
32ABACME ACME PO 01047 ACME 01045 000000T0M0A0T0M0A0
32ABACME ACME PO 99905 ACME 99900 000000T0M0A3T0M0A0
52ABADEN ADEN PO ADEN 000000T0K0A0T0K0N0
32ABADEN ADEN PO 00022 ADEN 00001 000000T0K0A0T0K0N0
42ABAETNA AETNA RPO RR0001 AETNA 000000T0K1Y0T0K0K0
32ABAETNA AETNA RPO 00097 AETNA 00001 000000T0K1Y0T0K0K0
11ABAIRDRIE 1 AVE NE1000233 000221 AIRDRIE 000000T4B0R5T4A0C0
11ABAIRDRIE 1 AVE NE1000405 000405 AIRDRIE 000000T4B1R1T4A0C0
11ABAIRDRIE 1 AVE NE1000413 000409 AIRDRIE 000000T4B1R2T4A0C0
11ABAIRDRIE 1 AVE NE1000509 000417 AIRDRIE 000000T4B1R3T4A0C0
11ABAIRDRIE 1 AVE NE1000513 000513 AIRDRIE 000000T4B1R3T4A0C0
11ABAIRDRIE 1 AVE NE1000525 000525 AIRDRIE 000000T4B1R9T4A0C0
11ABAIRDRIE 1 AVE NE2000120 000104 AIRDRIE 000000T4B0R6T4A0C0D
11ABAIRDRIE 1 AVE NE2000122 000104 AIRDRIE 000000T4B0R6T4A0C0A
11ABAIRDRIE 1 AVE NE2000232 000124 AIRDRIE 000000T4B0R4T4A0C0
11ABAIRDRIE 1 AVE NE2000332 000332 AIRDRIE 000000T4B2K5T4A0C0
11ABAIRDRIE 1 AVE NE2000424 000404 AIRDRIE 000000T4B1R2T4A0C0
11ABAIRDRIE 1 AVE NE2000520 000428 AIRDRIE 000000T4B1R1T4A0C0
11ABAIRDRIE 1 AVE NE2000528 000524A AIRDRIE 000000T4B1R9T4A0C0
11ABAIRDRIE 1 AVE NE2000532 104 000532 101AIRDRIE 000000T4B1S1T4A0C0
11ABAIRDRIE 1 AVE NW1000225 000225 AIRDRIE 000000T4B2M8T4A0C0
11ABAIRDRIE 1 AVE NW1000305 326 000305 301AIRDRIE 000000T4B2M5T4A0C0
11ABAIRDRIE 1 AVE NW1000305 126 000305 101AIRDRIE 000000T4B2M5T4A0C0
11ABAIRDRIE 1 AVE NW1000305 226 000305 201AIRDRIE 000000T4B2M5T4A0C0
11ABAIRDRIE 1 AVE NW1000305 426 000305 401AIRDRIE 000000T4B2M5T4A0C0
11ABAIRDRIE 1 AVE NW1000409 10 000409 1AIRDRIE 000000T4B3E2T4A0C0
11ABAIRDRIE 1 AVE NW1001505 001505 AIRDRIE 000000T4B2L9T4A0C0
11ABAIRDRIE 1 AVE NW2000104 121 000104 101AIRDRIE 000000T4B0R2T4A0C0
11ABAIRDRIE 1 AVE NW2000124 000120 AIRDRIE 000000T4B0R2T4A0C0
11ABAIRDRIE 1 AVE NW2000132 406 000132 101AIRDRIE 000000T4B3H4T4A0C0
11ABAIRDRIE 1 AVE NW2000240 000140 AIRDRIE 000000T4B0R2T4A0C0
11ABAIRDRIE 1 AVE NW2000304A 999 000304A 999AIRDRIE 000000T4B0C4T4A0C0
11ABAIRDRIE 1 AVE NW2000304 000304 AIRDRIE 000000T4B0C4T4A0C0
11ABAIRDRIE 1 AVE NW2000304 103 000304 101AIRDRIE 000000T4B0C4T4A0C0
11ABAIRDRIE 1 AVE NW2000406 210 000406 101AIRDRIE 000000T4B3H1T4A0C0
11ABAIRDRIE 1 AVE NW2000408 000408 AIRDRIE 000000T4B2R3T4A0C0
11ABAIRDRIE 1 AVE NW2000620 17 000620 1AIRDRIE 000000T4B2R3T4A0C0
11ABAIRDRIE 1 AVE NW2000836 101 000836 101AIRDRIE 000000T4B0V2T4A0C0
11ABAIRDRIE 1 AVE NW2000836 209 000836 201AIRDRIE 000000T4B0V2T4A0C0
11ABAIRDRIE 1 AVE NW2001736 001736 AIRDRIE 000000T4B2C4T4A0C0
11ABAIRDRIE 1 AVE NW2001820 001820 AIRDRIE 000000T4B2E6T4A0C0
11ABAIRDRIE 1 AVE SE1000329 000305 AIRDRIE 000000T4B1H6T4A0C0
11ABAIRDRIE 1 AVE SE1000441 000333 AIRDRIE 000000T4B1H2T4A0C0
11ABAIRDRIE 1 AVE SE2000308 000308 AIRDRIE 000000T4B1H6T4A0C0
11ABAIRDRIE 1 AVE SE2000340 000312 AIRDRIE 000000T4B1H5T4A0C0
11ABAIRDRIE 1 AVE SE2000408 000404 AIRDRIE 000000T4B1H2T4A0C0
11ABAIRDRIE 1 AVE SE2000440 000412 AIRDRIE 000000T4B1H1T4A0C0
11ABAIRDRIE 1 AVE SW1000905 7 000905 1AIRDRIE 000000T4B2X7T4A0C0
11ABAIRDRIE 1 ST NW1000133 000105 AIRDRIE 000000T4B0R3T4A0C0
11ABAIRDRIE 1 ST NW1000213 3 000213 1AIRDRIE 000000T4B0R2T4A0C0
11ABAIRDRIE 1 ST NW1000217 4 000217 1AIRDRIE 000000T4B0R2T4A0C0
11ABAIRDRIE 1 ST NW1000305 4 000305 1AIRDRIE 000000T4B1E2T4A0C0
11ABAIRDRIE 1 ST NW1000429 000309 AIRDRIE 000000T4B1E2T4A0C0
11ABAIRDRIE 1 ST NW1000609 000505 AIRDRIE 000000T4B1C9T4A0C0
11ABAIRDRIE 1 ST NW2000132 000108 AIRDRIE 000000T4B0R3T4A0C0
11ABAIRDRIE 1 ST NW2000416 000308 AIRDRIE 000000T4B1E2T4A0C0
Reeza
Super User
It does then, but you'll need the record layout to read the file.
First two characters are a geo code, province, city, street/address, Postal code is then at the T location and past it, looks like two postal codes.
My guess would be one is a current and then a previous one so this file looks like an update file of some sort?

Lucky I'm from Alberta, but fortunately not Airdrie 😉
Reeza
Super User
file add 'path to add file';

data demo;
length variable $5000.;
infile add lrecl=5000 obs=500;
infile;
variable = _infile_;
run;


That's what I'd use to start reading it into SAS and then parsing it out as needed.

If it's fixed width it's painful to decode for sure. 

 

alepage
Barite | Level 11
You are right but as I am very curious, I want to know what we can do with those file that will continue to be hosted on one of our servers. I will try to find who could use those files.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1022 views
  • 0 likes
  • 3 in conversation