U.S. Census Bureau

Electronic Product User Note

County to County Migration

Product description

Download DOS software 01/22/1999 lookup program and technical documentation program

Do you get "runtime error - R6003 divide by zero" message?

Some users of our GO software will see a message runtime error - R6003 divide by zero and will be unable to start program. This will primarily affect users who have a Pentium II, AMD K6 or similar fast processor. This update fixes this problem.


This software converts binary data files on the County to County Migration Flow Files CD-ROM to ASCII files.

Download DOS software Binary to ASCII conversion software

It is run by typing "GO" followed by three parameters and pressing ENTER. The parameters are: the name of the input file (which the user creates), the letter of your CD-ROM drive, and the path in which the converted ASCII files should be placed (a period or blank if they should be placed in the current directory. The user-created input file will list all the binary files the user wishes to convert. Each binary file should be listed on a separate line. The root of the binary file name (state, county and MCD code stuck together) should appear in the first eight columns of each line. The remainder of the line, if any, will be ignored.

The software first creates an ASCII file with the same name as the binary file but ending in .AS2. This file is a literal translation of the binary file (ending in .CNT) with both geographies intact. Each record in this file will contain the table number to which the record pertains (columns 1-2), five class indicators (columns 3-5, 6-8, 9-11, 12-14 and 15-17) and finally the count for that record (columns 18-25). These class indicators are merely numbers which tell us the class number of the variables in the table to which record applies. Suppose the table number is 6 and the class indicators are 2, 4, 1, 3 and 1. Table 6 shows Race by Age-2 by Household Type by Poverty. Thus the first class indicator refers to Race, the second to Age-2, etc. The fifth class indicator may be ignored in this case because there are only 4 variables in table 6 (any time a class indicator may be ignored it will be 1). We see that the Race class indicator is 2, meaning the record pertains to people who fall in Race class #2 (Black). The Age-2 class indicator is 4, so we know this record also pertains to the 4th age class (20 to 24 years old). By continuing we would find out that this record gives us a count of black persons age 20 to 24 living in a married-couple family household and below the poverty line in 1989 who moved from some secondary geography to the primary geography. The primary geography is found by using the state, county and MCD codes from the binary file name.

Here's now to find the secondary geography. Notice for each county there is both a .CNT file and a .DBF file on the CD-ROM. The DBF file is a geographic reference file you can use with the literally translated file (.AS2) the GO software creates. Each DBF file record lists the codes and names of the country or state, county and MCD for the secondary geography. More importantly each record has a field called NUMBINRECS (or something like that). This lists the number of binary records (or ASCII records once translated) that pertain to that secondary geography. For example, say we translate the binary file for Cook County, IL (in-migration). Suppose its DBF file looks like this:

Secondary Geo: NumBinRecs:
people who did not move 3000
Los Angeles Co., CA 1500
Dade Co., FL 650
Cook Co., IL 2450
Bronx Co., NY 400
POLAND 225

This means records 1-3000 pertain to Cook Co. residents who did not move, 3001-4500 to those who moved from Los Angeles Co., 4501-5150 from Dade Co., 5151-7600 within Cook Co., 7601-8000 from Bronx Co. and 8001-8225 from Poland. So now we go back to our ASCII file and grab as many records as we need for each secondary geography. From those, we can construct any of the tables for that pair of geographies. Simply use the records for the table of interest.

A few notes. One, within each secondary geography you may find two or more like records. I.E.E.G., you might find three records showing counts for white females age 30 to 34 who moved from Bronx Co., NY to Cook Co., IL. If you do, just add the counts on those three records to get the correct count of white females age 30 to 34 moving from Bronx to Cook. The reason this occurs from time to time is that the correct count is very large - too large to store on one binary record so we had to find some other way to store it.

Two, some records may be missing from the .AS2 file. For example, there may not be a record showing the number of Asian males age 45 to 49 who moved from Bronx to Cook. This would indicate there were no such persons. These records were excluded from the binary files to reduce their sizes.

Three, the secondary geographies appear in the folowing order: people who did not move followed by all counties/MCDs in state, county, MCD order and lastly foreign countries (in-migration only) in continental region, country order. Thus within-county movers will appear at a different point in the list of secondary geographies for each primary geography.

After creating the .AS2 file, the GO software uses it to create a .AS1 file with the same name and file format and with the zero count cells included. The .AS1 file essentially is the .AS2 file aggregated for all secondary geographies. Thus, users may see tables showing total movement into or out of a county/MCD without regard to secondary geography.

Note that the .AS1 file includes people moving within county or MCD and non-movers. Thus the file will actually show data on the number of people who lived in (not moved into) the county/MCD in 1990 when using in-migration files. It will show data on the number of people who lived in (not moved out of) the county/MCD in 1985 excluding anyone who moved out of the United States when using out-migration files.

If interested in finding the net migration into or out of a county/MCD, users will need to construct tables from the records in the .AS2 file for non-movers and within county/MCD movers. Once this is done, subtract the figures in each non-mover and within county/MCD mover table cell from the corresponding cell in the .AS1 file. The difference will be the count of in/out-migrants for that cell.


Source: U.S. Census Bureau, Administrative and Customer Services Division, Electronic Products Development Branch
Last Revised: May 02, 2005 at 02:34:17 PM