DAT file example, 1980 Census STF1

The files illustrated are for 1980 Census Summary tape file 1 (STF1) at the (1980) county level.

(output from xdump )

s10.dat Delaware
s11.dat District of Columbia
s44.dat Rhode Island

Delaware has three counties. Three records of similar format are concatenated into the single binary file s10.dat. The recordsize of s10.dat (42 words, or 168 bytes) is specified in the file s10.ndx .

Data records for the three counties have the following sizes and starting locations, as specified in s10.ndx.

county		record_size	starting_block	byte_offset
		(dec)		(dec)		(hex)	(dec)
1		1152			1	0	0
2		1227			8	498	1176 = (8-1)*168
3		1148			16	9d8	2520 = (16-1)*168

The record for county 1 has the following structure:
byte_offset	rel	bytes	pos	contents
(hex)	(dec)	(dec)	(dec)
0	0-3	0-3	4	0	80040000: byte-reversed 00000480

4	4	4	1	1	05: 5-byte record size follows
5-9	5-9	5-9	5	1	0000000480 = decimal 1152
a-f	10-15	10-15	6	1	b80000000000: skip code
10-12	16-18	16-18	3	1	000099 = decimal 153 (60-bit words)

13	19	19	1	2	a1: a one-byte character count follows
14	20	20	1	2	05: 5 characters follow
15-9	21-5	21-5	5	2	5354463141 = "STF1A"

1a	26	26	1	3	a1: a one-byte character count follows
1b	27	27	1	3	02: 2 characters follow
1c-d	28-9	28-9	2	3	3131 = "11"

etc

7c	124	124	1	26	a1: a one-byte character count follows
7d	125	125	1	26	02: 2 characters follow
7e-f	126-7	126-7	2	26	3030 = "00"

80	128	128	1	27-29	91: a one-byte repeat count follows
81	129	129	1	27-29	03: following value repeats 3 times
82	130	130	1	27-29	80: decimal 0

83	131	131	1	30	a1: a one-byte character count follows
84	132	132	1	30	02: 2 characters follow
85-6	133-4	133-4	2	30	3031 = "01" 

87	135	135	1	31	a1: a one-byte character count follows
88	136	136	1	31	03: 3 characters follow
89-8b	137-9	137-9	3	31	303135 = "015"

8c	140	140	1	32	82: a two-byte value follows
8d-8e	141-2	141-2	2	32	0911 = decimal 2321

8f	143	143	1	33	81: a one-byte value follows
90	144	144	1	33	66 = decimal 102

91	145	145	1	34-36	91: a one-byte repeat count follows
92	146	146	1	34-36	03: following value repeats 3 times
93	147	147	1	34-36	80 = decimal 0

94	148	148	1	37	a1: a one-byte character count follows
95	149	149	1	37	01: 1 character follows
96	150	150	1	37	30 = "0"

97	151	151	1	38	80 = decimal 0

98	152	152	1	39	a1: a one-byte character count follows
99	153	153	1	39	01: 1 character follows
9a	154	154	1	39	30 = "0"

9b	155	155	1	40	a1: a one-byte character count follows
9c	156	156	1	40	01: 1 character follows
9d	157	157	1	40	30 = "0"

9e	158	158	1	41-42	91: a one-byte repeat count follows
9f	159	159	1	41-42	02: following value repeats 2 times
a0	160	160	1	41-42	80 = decimal 0

a1	161	161	1	43	81: a one-byte value follows
a2	162	162	1	43	03 = decimal 3

a3	163	163	1	44	a1: a one-byte character count follows
a4	164	164	1	44	26(hex)=38(dec); 38 characters follow
a5-ca	165-202	165-202	38	44	4b45..5245 = "KENT...DELAWARE"

cb	203	203	1	45-65	91: a one-byte repeat count follows
cc	204	204	1	45-65	15: following value repeats 21 times
cd	205	205	1	45-65	80 = decimal 0

ce	206	206	1	66	83: a 3-byte value follows
cf-d1	207-9	207-9	3	66	017fab = decimal 98219

etc

46c	1132	1132	1	x	82: a 2-byte value follows
46d-e	1133-4	1133-4	2	x	03d9 = decimal 985

46f	1135	1135	1	x	82: a 2-byte value follows
470-1	1136-7	1136-7	2	x	026f = decimal 623

472	1138	1138	1	x	a1: a one-byte character count follows
473	1139	1139	1	x	01: 1 byte follows
474	1140	1140	1	x	ff: end-of-record indicator
475-b	1141-7	1141-7	7	x	ffffffffffffff: filler
47c	1148	1148	1	x	a1: a one-byte character count follows
47d	1149	1149	1	x	01: 1 byte follows
47e	1150	1150	1	x	ff: end-of-record indicator
47f-483	1151-5	1151-5	5	x	ffffffffff: filler
484-f	1156-67	1156-67	12	x	00..00: filler

The record for county 2 has the following structure:
byte_offset	rel	bytes	pos	contents
(hex)	(dec)	(dec)	(dec)

498	1176-9	0-3	4	0	cb040000: byte-reversed 000004cb

49c	1180	1	1	1	05: 5-byte record size follows
49d-4a1	1181-85	5-9	5	1	00000004cb = decimal 1227 (bytes)
4a2-4a7	1186-91	10-15	6	1	b80000000000: skip code
4a8-4aa 1192-94	16-18	3	1	0000a3 = decimal 163 (60-bit words)

4ab	1195	19	1	2	a1: a one-byte character count follows
4ac	1196	20	1	2	05: 5 characters follow
4ad	1197	21-5	5	2	5354463141 = "STF1A"

4b2	1202	26	1	3	a1: a one-byte character count follows
4b3	1203	27	1	3	02: 2 characters follow
4b4	1204	28-9	2	3	3131 = "11"
etc
514	1300	124	1	26	a1: a one-byte character count follows
515	1301	125	1	26	01: 1 character follows
516	1302	126-7	2	26	3030 = "00"

518	1304	128	1	27-29	91: a one-byte repeat count follows
519	1305	129	1	27-29	03: following value repeats 3 times
51a	1306	130	1	27-29	80: decimal 0

51b	1307	131	1	30	a1: a one-byte character count follows
51c	1308	132	1	30	02: 2 characters follow
51d	1309	133-4	2	30	3041 = "0A" 

51f	1311	135	1	31	a1: a one-byte character count follows
520	1312	136	1	31	03: 3 characters follow
521	1313	137	3	31	303135 = "015"

524	1316	140	1	32	82: a two-byte value follows
525	1317	141-2	2	32	092b = decimal 2347

527	1319	143	1	33	81: a one-byte value follows
528	1320	144	1	33	66 = decimal 102

529	1321	145	1	34	81: a one-byte value follows
52a	1322	146	1	34	04 = decimal 4

52b	1323	147	1	35-6	91: a one-byte repeat count follows
52c	1324	148	1	35-6	02: following value repeats 2 times
52d	1325	149	1	35-36	80 = decimal 0

52e	1326	150	1	37	a1: a one-byte character count follows
52f	1327	151	1	37	01: 1 character follows
530	1330	152	1	37	30 = "0"

531	1331	153	1	38	80 = decimal 0

532	1332	154	1	39	a1: a one-byte character count follows
533	1333	155	1	39	01: 1 character follows
534	1334	156	1	39	30 = "0"

535	1333	157	1	40	a1: a one-byte character count follows
536	1334	158	1	40	01: 1 character follows
537	1335	159	1	40	30: = "0"

538	1336	160	1	41-42	91: a one-byte repeat count follows
539	1337	161	1	41-42	02: following value repeats 2 times
53a	1338	162	1	41-42	80 = decimal 0

53b	1339	163	1	43	81: a one-byte value follows
53c	1340	164	1	43	03 = decimal 3

53d	1341	165	1	44	a1: a one-byte character count follows
53e	1342	166	1	44	26(hex)=38(dec); 38 characters follow
53f-64	1343-80	167-204	38	44	4b45..5245 = "KENT...DELAWARE"

565	1381	205	1	45-65	91: a one-byte repeat count follows
566	1382	206	1	45-65	15: following value repeats 21 times
567	1383	207	1	45-65	80 = decimal 0

568	1384	208	1	66	83: a 3-byte value follows
569-6b	1385-7	209-11	3	66	061323 = decimal 398115

etc

94f	2383	1207	1	x	82: a 2-byte value follows
950-51	2384-5	1208-9	2	x	0b3e = decimal xx

952	2386	1210	1	x	82: a 2-byte value follows
953-54	2387-8	1211-2	2	x	07e1 = decimal xx

955	2389	x	1	x	a1: a one-byte character count follows
956	2390	x	1	x	01: 1 byte follows
957	2391	x	1	x	ff: end-of-record indicator
958-5e	2392-8	x-x	7	x	ffffffffffff: filler
95f	2399	x	1	x	a1: a one-byte character count follows
960	2400	x	1	x	01: 1 byte follows
961	2401	x	1	x	ff: end-of-record indicator
962-6	2402-6	x-x	5	x	ffffff: filler
967-f	2407-15	x-x	9	x	000000000000000000: filler


back to compressed binary data (DAT) files


seedis/compressed/stf1.html 1/11/96 in:

http://parep2.lbl.gov/mdocs
http://merrill.wwh.net/mdocs
http://imap.chesapeake.net/~merrill/mdocs

merrill@crocker.com