[comp.dcom.telecom] NPA-NXX databases

hamilton@osiris.cso.uiuc.edu (Wayne Hamilton) (06/02/89)

I found a file on a BBS, containing a program and data files to
provide a NPA-NXX to zipcode cross-reference.  I quote here from
the README file that accompanied the package:
=======================
(start of quoted section)

                         ZIP-PHONE
                        Version 1.2
                 Copyright (c) 1986, AT&T
                       Not for Resale

 ZIPPHONE was created to provide cross-references between
 ZIPCODES and NPA-NXXs.  It is not meant to fufill all possible uses
 of the information. However, ZIPPHONE can create data files that
 may be used as input to other programs that would be able to address
 a specific need.

 Because of the amount of information, the ZIPPHONE hase been split
 onto two disks that cover the continental United States
 (48 states and the District of Columbia):

            Disk 1 contains: Eastern and Central States
                             ME,VT,NH,MA,NY,PA,NJ,RI,CT,LA,
                             WV,VA,NC,SC,GA,FL,AL,MI,WI,IA
                             AR,MO,IL,TN,KY,OH,IN,MI,MN,DC,
                             DE,MD

            Disk 2 contains: Western and some Central States
                             WA,OR,CA,NV,ID,MT,WY,CO,NM,TX
                             AZ,ND,SD,NE,KS,OK

 To execute ZIPPHONE from the A: floppy disk drive, type the following:
            A:  <cr>
            ZIPPHONE  <cr>
 Then select the item desired from the displayed menu.

 For your convenience, ZIPPHONE is not copy-protected.  You may
 make backup copies or copy it onto your hard-disk.

 ZIPPHONE is composed of the following files:
            ZIPPHONE.EXE
            ZIPSTATE.DAT
            NPAxxx.ZIP   (where xxx is an NPA)

 -----------------------> For Programmers <------------------------

      The ZIPPHONE data files that contain the NPA-NXX to Zipcode
 translations (npaxxx.zip) are in Binary Coded Decimal (BCD).
 Consequently, other programs cannot directly access the information
 contained therein, unless the program uses a programming language
 such as C Language which provides bit manipulation facilities.
 The BCD format produces a 70% disk space reduction over the
 ZIPPHONE format in Option 10, and the format also decreases execution
 time by reducing disk I/O.

 The information in the NPA BCD file is sorted by NXX and ZIPCODE.
 The general format is:
         NXX
         First digit of the valid zipcodes for the NPA
         Number of Zipcodes for the NXX
         List of the Last 4-digits of the Zipcodes for the NXX

 Specifically, for each NXX in the NPA BCD file, the format is:
       bits 4-7 of byte 1 = 1st digit of NXX
       bits 0-3 of byte 1 = 2nd digit of NXX
       bits 4-7 of byte 2 = 3rd digit of NXX
       bits 0-3 of byte 2 = 1st digit of Zipcodes for this NPA
       bits 4-7 of byte 3 = tens digit of no. of Zipcodes for this NXX
       bits 0-3 of byte 3 = ones digit of no. of Zipcodes for this NXX

       For each ZIPCODE for the NXX, the format is:
          bits 4-7 of byte x = 2nd digit of a Zipcode for this NXX
          bits 0-3 of byte x = 3rd digit of a Zipcode for this NXX
          bits 4-7 of byte x+1 = 4th digit of a Zipcode for this NXX
          bits 0-3 of byte x+1 = 5th digit of a Zipcode for this NXX
       where 'x' starts at byte 4 is increased by 2 for each Zipcode
       for the NXX.

(end of quoted section)
======================
My first question: is this a proprietary product that should not have
been available for download?  Or is it something that AT&T gives away,
like those little pocket phone directories?

Then my second question: where can I legitimately obtain more
up-to-date data of this sort?  I have heard about the V&H tapes; I
gather that they contain city names and location coordinates for all
NPA-NXX's.  I would like to have that kind of data to play with.  I
have the impression that the tapes themselves are rather expensive.
Since I don't require the most recent edition for my casual personal
use, would it be feasible to get it "second-hand" somewhere?  I'm a
programmer, so I'd be more interested in having raw data to build my
own applications than in buying a commercially avaliable software/data
package.  Some of the things I'd like to do with this data are: plot
maps of phone numbers, check that phone numbers match addresses,
estimate long-distance charges, and the like.

	wayne hamilton
	U of Il and US Army Corps of Engineers CERL
UUCP:	{convex,uunet}!uiucuxc!osiris!hamilton
ARPA:	hamilton@osiris.cso.uiuc.edu	USMail:	Box 476, Urbana, IL 61801
CSNET:	hamilton%osiris@uiuc.csnet	Phone:	(217)333-8703

langz@asylum.sf.ca.us (Lang Zerner) (06/04/89)

There is a New Jersey, USA number (probably at Bell Labs) which reads area
codes from your touchtone pads, then uses a DECtalk speech synthesizer to speak
the name of the city as it appears in their database.  This seems to be the
database that AT&T uses in itemizing its long-distance calling charges.

The reader is pretty smart, but has problems in cases where vowels are removed
from the city name because it would otherwise be too long.  Then it just reads
the letters in the name.  Also, it tries to read out as words the two-letter
postal codes for state names.  So you get interesting results with something
like SNCRLS-BLMNT, CA (which is close to the text representation of San
Carlos/Belmont NPA-NXXs).  Still, the system is fast and correct.

I don't have the number handy, but I will be happy to look it up for you if you
*MAIL* a request (remember to try the addresses below if you get a bounce, or
call me at 415/327-9232).

--
Be seeing you...
--Lang Zerner
ARPA:langz@athena.mit.edu  MX:langz@asylum.sf.ca.us  UUCP:bionet!asylum!langz
"...and every morning we had to go and LICK the road clean with our TONGUES!"