1010 REM By: Melvin O. Duke. Updated 26 June, 1983.
1020 OPEN "a:persfile" AS #1 LEN = 256
1030 FIELD 1, 5 AS F1$, 20 AS F2$, 30 AS F3$, 2 AS F4$, 5 AS F5$, 5 AS F6$, 5 AS F7$, 11 AS F8$, 18 AS F9$, 16 AS F10$, 16 AS F11$, 11 AS F12$, 18 AS F13$, 16 AS F14$, 16 AS F15$, 11 AS F16$, 18 AS F17$, 16 AS F18$, 16 AS F19$
1040 REM Read all records, and create the index.
1050 CLS
1060 C = 0
1070 FOR I = 1 TO 400
1080 GET #1, I
1090 LOCATE 15,1 : PRINT "Processing Person Record:"; I;
1100 REM Extract information from the file
1110 T1 = CVS(F1$) 'Child-id
1120 IF T1 < 0 THEN 1450
1130 T6 = CVS(F6$) 'Father-id
1140 T7 = CVS(F7$) 'Mother-id
1150 T8$ = F8$ 'Birthdate as dd mmm yyyy
1160 IF T8$ = " " THEN BD = 0 : GOTO 1330
1170 REM convert Birthdate
1180 BD = VAL(RIGHT$(T8$,4))*10000!
1190 MO$ = MID$(T8$,4,3)
1200 IF MO$ = "Jan" THEN BD = BD + 100 : GOTO 1320
1210 IF MO$ = "Feb" THEN BD = BD + 200 : GOTO 1320
1220 IF MO$ = "Mar" THEN BD = BD + 300 : GOTO 1320
1230 IF MO$ = "Apr" THEN BD = BD + 400 : GOTO 1320
1240 IF MO$ = "May" THEN BD = BD + 500 : GOTO 1320
1250 IF MO$ = "Jun" THEN BD = BD + 600 : GOTO 1320
1260 IF MO$ = "Jul" THEN BD = BD + 700 : GOTO 1320
1270 IF MO$ = "Aug" THEN BD = BD + 800 : GOTO 1320
1280 IF MO$ = "Sep" THEN BD = BD + 900 : GOTO 1320
1290 IF MO$ = "Oct" THEN BD = BD + 1000 : GOTO 1320
1300 IF MO$ = "Nov" THEN BD = BD + 1100 : GOTO 1320
1310 IF MO$ = "Dec" THEN BD = BD + 1200 : GOTO 1320