home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
database
/
ezfile.lbr
/
EZFILE.BQS
/
EZFILE.BAS
Wrap
BASIC Source File
|
1986-10-07
|
22KB
|
697 lines
10 REM EZFILE.BAS
20 PRINT CHR$(26)
30 PRINT " EZFILE"
40 PRINT:PRINT " A DATA MANAGEMENT PROGRAMME"
50 PRINT:PRINT:PRINT:PRINT " 1. CHANGE a record."
60 PRINT:PRINT " 2. ADD new records."
70 PRINT:PRINT " 3. CREATE a new data file."
80 PRINT:PRINT:PRINT "Chose 1 - 3"
90 PRINT:INPUT AN$
100 IF AN$= "1" THEN 150
110 IF AN$= "2" THEN 370
120 IF AN$= "3" THEN 900
130 IF AN$= "" THEN PRINT CHR$(7):GOTO 10
140 IF AN$ <> "3" THEN PRINT CHR$(7):GOTO 10
150 PRINT CHR$(26)
160 PRINT:PRINT "Please enter the name of the DATA file"
170 INPUT "you wish to edit: ";FILE$
180 IF FILE$= "" GOTO 150
190 :
200 OPEN "O",1,"B:COPY.DAT"
210 OPEN "I",2,FILE$:GOTO 250
220 :
230 PRINT CHR$(26):PRINT CHR$(7)
240 PRINT "ERROR"
250 PRINT:PRINT "Now enter the number of fields"
260 INPUT "in this DATA file (3-10): ";YYY$
270 IF YYY$= "3" THEN 3360
280 IF YYY$= "4" THEN 3590
290 IF YYY$= "5" THEN 3870
300 IF YYY$= "6" THEN 4200
310 IF YYY$= "7" THEN 4440
320 IF YYY$= "8" THEN 4730
330 IF YYY$= "9" THEN 5070
340 IF YYY$= "10" THEN 5460
350 IF YYY$ <> "10" THEN 230
360 :
370 PRINT CHR$(26)
380 PRINT "Please enter the name of the Data file you"
390 INPUT "are adding to: "; FILE$
400 IF FILE$= "" THEN 370
410 :
420 OPEN "O",1,"B:COPY.DAT"
430 OPEN "I",2,FILE$
440 :
450 PRINT:PRINT:PRINT "Now enter the number of fields"
460 INPUT "in this DATA File: "; YYY$
470 IF YYY$= "3" THEN 640
480 IF YYY$= "4" THEN 2400
490 IF YYY$= "5" THEN 2520
500 IF YYY$= "6" THEN 2650
510 IF YYY$= "7" THEN 2770
520 IF YYY$= "8" THEN 2900
530 IF YYY$= "9" THEN 3040
540 IF YYY$= "10" THEN 3190
550 IF YYY$ <> "10" THEN PRINT CHR$(26)
560 PRINT "You must enter from 3 to 10 fields.":GOTO 450
570 :
580 OPEN "O",1,"B:COPY.DAT"
590 OPEN "I",2,FILE$
600 :
610 REM THE FOLLOWING WHILE LOOP IS SKIPPED IF THE OPEN STATMENT
620 REM FOR XXX.DAT CAUSED AN ERROR 53 (FILE NOT FOUND ON DISK)
630 :
640 WHILE NOT EOF(2)
650 INPUT# 2,FIRST$,SECOND$,THIRD$
660 WRITE# 1,FIRST$;SECOND$;THIRD$
670 WEND
680 :
690 GOSUB 6430
700 PRINT CHR$(26)
710 GOSUB 6470
720 :
730 WRITE#1,AAA$;BBB$;CCC$
740 GOTO 700
750 GOTO 6580
760 :
770 PRINT:PRINT:PRINT "Do you wish to continue?"
780 PRINT:PRINT:INPUT ANW$
790 IF ANW$= "YES" THEN PRINT CHR$(26):GOTO 50
800 IF ANW$= "Yes" THEN PRINT CHR$(26):GOTO 50
810 IF ANW$= "yes" THEN PRINT CHR$(26):GOTO 50
820 IF ANW$= "Y" THEN PRINT CHR$(26):GOTO 50
830 IF ANW$= "y" THEN PRINT CHR$(26):GOTO 50
840 PRINT CHR$(26)
850 PRINT:PRINT:PRINT:PRINT
860 PRINT "Very well, until next time..."
870 PRINT:PRINT:PRINT
880 END
890 :
900 PRINT CHR$(26)
910 PRINT:PRINT " YOU ARE OPENING A NEW DATA FILE"
920 PRINT:PRINT:PRINT "Enter new file name as 'B:XXXXXXXX.DAT'"
930 PRINT:PRINT:INPUT DAT$
940 IF DAT$= "" THEN GOTO 770
950 :
960 OPEN "O",#1,DAT$
970 PRINT CHR$(26)
980 PRINT" *** INSTRUCTIONS ***"
990 PRINT:PRINT "Your New Data File must contain from 3 to 10 fields."
1000 PRINT:PRINT "Select 3 to 10: ";
1010 INPUT NO$
1020 IF NO$= "3" THEN GOTO 1130
1030 IF NO$= "4" THEN GOTO 1180
1040 IF NO$= "5" THEN GOTO 1260
1050 IF NO$= "6" THEN GOTO 1370
1060 IF NO$= "7" THEN GOTO 1440
1070 IF NO$= "8" THEN GOTO 1540
1080 IF NO$= "9" THEN GOTO 1670
1090 IF NO$= "10" THEN GOTO 1830
1100 IF NO$ <> "10" THEN PRINT CHR$(26):GOTO 1110
1110 PRINT CHR$(7):PRINT:PRINT "You must select from 3 to 10 fields to coninue.":GOTO 1000
1120 :
1130 GOSUB 6320
1140 GOSUB 6140
1150 WRITE#1,ONE$;TWO$;THREE$:GOTO 1140
1160 GOTO 2000
1170 :
1180 GOSUB 6320
1190 PRINT:INPUT "Enter name of fourth field: ",FOURTH$
1200 GOSUB 6140
1210 PRINT:PRINT FOURTH$": ";
1220 INPUT FOUR$
1230 WRITE #1,ONE$;TWO$;THREE$;FOUR$:GOTO 1200
1240 GOTO 2000
1250 :
1260 GOSUB 6320
1270 PRINT:INPUT "Enter name of fourth field: ",FOURTH$
1280 PRINT:INPUT "Enter name of fifth field: ",FIFTH$
1290 GOSUB 6140
1300 PRINT:PRINT FOURTH$": ";
1310 INPUT FOUR$
1320 PRINT:PRINT FIFTH$": ";
1330 INPUT FIVE$
1340 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$:GOTO 1290
1350 GOTO 2000
1360 :
1370 GOSUB 6320
1380 GOSUB 6390
1390 GOSUB 6140
1400 GOSUB 6240
1410 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$;SIX$:GOTO 1390
1420 GOTO 2000
1430 :
1440 GOSUB 6320
1450 GOSUB 6390
1460 PRINT:INPUT "Enter name of seventh field: ",SEVENTH$
1470 GOSUB 6140
1480 GOSUB 6240
1490 PRINT:PRINT SEVENTH$": ";
1500 INPUT SEVEN$
1510 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$;SIX$;SEVEN$:GOTO 1470
1520 GOTO 2000
1530 :
1540 GOSUB 6320
1550 GOSUB 6390
1560 PRINT:INPUT "Enter name of seventh field: ",SEVENTH$
1570 PRINT:INPUT "Enter name of eighth field: ",EIGHTH$
1580 GOSUB 6140
1590 GOSUB 6240
1600 PRINT:PRINT SEVENTH$": ";
1610 INPUT SEVEN$
1620 PRINT:PRINT EIGHTH$": ";
1630 INPUT EIGHT$
1640 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$;SIX$;SEVEN$;EIGHT$:GOTO 1580
1650 GOTO 2000
1660 :
1670 GOSUB 6320
1680 GOSUB 6390
1690 PRINT:INPUT "Enter name of seventh field: ",SEVENTH$
1700 PRINT:INPUT "Enter name of eighth field: ",EIGHTH$
1710 PRINT:INPUT "Enter name of ninth field: ",NINTH$
1720 GOSUB 6140
1730 GOSUB 6240
1740 PRINT:PRINT SEVENTH$": ";
1750 INPUT SEVEN$
1760 PRINT:PRINT EIGHTH$": ";
1770 INPUT EIGHT$
1780 PRINT:PRINT NINTH$": ";
1790 INPUT NINE$
1800 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$;SIX$;SEVEN$;EIGHT$;NINE$:GOTO 1720
1810 GOTO 2000
1820 :
1830 GOSUB 6320
1840 GOSUB 6390
1850 PRINT:INPUT "Enter name of seventh field: ",SEVENTH$
1860 PRINT:INPUT "Enter name of eighth field: ",EIGHTH$
1870 PRINT:INPUT "Enter name of ninth field: ",NINTH$
1880 PRINT:INPUT "Enter name of tenth field: ",TENTH$
1890 GOSUB 6140
1900 GOSUB 6240
1910 PRINT:PRINT SEVENTH$": ";
1920 INPUT SEVEN$
1930 PRINT:PRINT EIGHTH$": ";
1940 INPUT EIGHT$
1950 PRINT:PRINT NINTH$": ";
1960 INPUT NINE$
1970 PRINT:PRINT TENTH$": ";
1980 INPUT TEN$
1990 WRITE #1,ONE$;TWO$;THREE$;FOUR$;FIVE$;SIX$;SEVEN$;EIGHT$;NINE$;TEN$:GOTO 1890
2000 CLOSE #1
2010 PRINT CHR$(26)
2020 PRINT "Your new data file "DAT$" has been saved."
2030 PRINT "Please note the fields used:"
2040 PRINT
2050 PRINT " 1. "FIRST$
2060 PRINT " 2. "SECOND$
2070 PRINT " 3. "THIRD$
2080 PRINT " 4. "FOURTH$
2090 PRINT " 5. "FIFTH$
2100 PRINT " 6. "SIXTH$
2110 PRINT " 7. "SEVENTH$
2120 PRINT " 8. "EIGHTH$
2130 PRINT " 9. "NINTH$
2140 PRINT " 10. "TENTH$
2150 :
2160 PRINT:PRINT "Do you wish a printout";
2170 INPUT V$
2180 IF V$= "YES" THEN 2240
2190 IF V$= "Yes" THEN 2240
2200 IF V$= "yes" THEN 2240
2210 IF V$= "Y" THEN 2240
2220 IF V$= "y" THEN 2240
2230 IF V$= <> "y" THEN 770
2240 PRINT CHR$(7)
2250 PRINT:PRINT "Press RETURN when printer is ready.";
2260 INPUT U$
2270 LPRINT; DAT$
2280 LPRINT:LPRINT "1. "FIRST$
2290 LPRINT "2. "SECOND$
2300 LPRINT "3. "THIRD$
2310 LPRINT "4. "FOURTH$
2320 LPRINT "5. "FIFTH$
2330 LPRINT "6. "SIXTH$
2340 LPRINT "7. "SEVENTH$
2350 LPRINT "8. "EIGHTH$
2360 LPRINT "9. "NINTH$
2370 LPRINT "10. "TENTH$
2380 GOTO 770
2390 :
2400 WHILE NOT EOF(2)
2410 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$
2420 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$
2430 WEND
2440 GOSUB 6430
2450 PRINT CHR$(26)
2460 GOSUB 6470
2470 PRINT:INPUT "Enter data for 4th field: ",DDD$
2480 WRITE#1,AAA$;BBB$;CCC$;DDD$
2490 GOTO 2450
2500 GOTO 6580
2510 :
2520 WHILE NOT EOF(2)
2530 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$
2540 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$
2550 WEND
2560 GOSUB 6430
2570 PRINT CHR$(26)
2580 GOSUB 6470
2590 PRINT:INPUT "Enter data for 4th field: ",DDD$
2600 PRINT:INPUT "Enter data for 5th field: ",EEE$
2610 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$
2620 GOTO 2570
2630 GOTO 6580
2640 :
2650 WHILE NOT EOF(2)
2660 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$
2670 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$
2680 WEND
2690 GOSUB 6430
2700 PRINT CHR$(26)
2710 GOSUB 6470
2720 GOSUB 6530
2730 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$;FFF$
2740 GOTO 2700
2750 GOTO 6580
2760 :
2770 WHILE NOT EOF(2)
2780 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$
2790 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$
2800 WEND
2810 GOSUB 6430
2820 PRINT CHR$(26)
2830 GOSUB 6470
2840 GOSUB 6530
2850 PRINT:INPUT "Enter data for 7th field: ",GGG$
2860 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$;FFF$;GGG$
2870 GOTO 2820
2880 GOTO 6580
2890 :
2900 WHILE NOT EOF(2)
2910 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$
2920 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$
2930 WEND
2940 GOSUB 6430
2950 PRINT CHR$(26)
2960 GOSUB 6470
2970 GOSUB 6530
2980 PRINT:INPUT "Enter data for 7th field: ",GGG$
2990 PRINT:INPUT "Enter data for 8th field: ",HHH$
3000 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$;FFF$;GGG$;HHH$
3010 GOTO 2950
3020 GOTO 6580
3030 :
3040 WHILE NOT EOF(2)
3050 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$
3060 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$
3070 WEND
3080 GOSUB 6430
3090 PRINT CHR$(26)
3100 GOSUB 6470
3110 GOSUB 6530
3120 PRINT:INPUT "Enter data for 7th field: ",GGG$
3130 PRINT:INPUT "Enter data for 8th field: ",HHH$
3140 PRINT:INPUT "Enter data for 9th field: ",III$
3150 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$;FFF$;GGG$;HHH$;III$
3160 GOTO 3090
3170 GOTO 6580
3180 :
3190 WHILE NOT EOF(2)
3200 INPUT# 2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$,TENTH$
3210 WRITE# 1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$;TENTH$
3220 WEND
3230 GOSUB 6430
3240 PRINT CHR$(26)
3250 GOSUB 6470
3260 GOSUB 6530
3270 PRINT:INPUT "Enter data for 7th field: ",GGG$
3280 PRINT:INPUT "Enter data for 8th field: ",HHH$
3290 PRINT:INPUT "Enter data for 9th field: ",III$
3300 PRINT:INPUT "Enter data for 10th field: ",JJJ$
3310 WRITE#1,AAA$;BBB$;CCC$;DDD$;EEE$;FFF$;GGG$;HHH$;III$;JJJ$
3320 GOTO 3240
3330 GOTO 6580
3340 :
3350 REM * * * CORRECTIONS * * *
3360 PRINT CHR$(26)
3370 INPUT "Enter the 1st field DATA: ";ONE$
3380 IF EOF (2) THEN 3430
3390 INPUT #2,FIRST$,SECOND$,THIRD$
3400 IF ONE$= FIRST$ THEN 3450
3410 WRITE #1,FIRST$;SECOND$;THIRD$
3420 GOTO 3380
3430 GOSUB 6070
3440 GOTO 160
3450 GOSUB 6640
3460 WRITE #1,FIRST$;SECOND$;THIRD$
3470 IF EOF (2) THEN 3510
3480 INPUT #2,FIRST$,SECOND$,THIRD$
3490 WRITE #1,FIRST$;SECOND$;THIRD$
3500 GOTO 3470
3510 GOSUB 6020
3520 IF EOF (1) THEN 3560
3530 INPUT #1,FIRST$,SECOND$,THIRD$
3540 WRITE #2,FIRST$;SECOND$;THIRD$
3550 GOTO 3520
3560 CLOSE 1,2
3570 GOTO 5890
3580 :
3590 PRINT CHR$(26)
3600 INPUT "Enter the 1st field DATA: ";ONE$
3610 IF EOF (2) THEN 3660
3620 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$
3630 IF ONE$= FIRST$ THEN 3680
3640 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$
3650 GOTO 3610
3660 GOSUB 6070
3670 GOTO 160
3680 GOSUB 6640
3690 PRINT:PRINT "The 4th field reads: "FOURTH$
3700 PRINT:PRINT "Enter RETURN or correct as follows:"
3710 INPUT DD$
3720 IF DD$= "" GOTO 3740
3730 LET FOURTH$= DD$
3740 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$
3750 IF EOF (2) THEN 3790
3760 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$
3770 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$
3780 GOTO 3750
3790 GOSUB 6020
3800 IF EOF (1) THEN 3840
3810 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$
3820 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$
3830 GOTO 3800
3840 CLOSE 1,2
3850 GOTO 5890
3860 :
3870 PRINT CHR$(26)
3880 INPUT "Enter the 1st field DATA: ";ONE$
3890 IF EOF (2) THEN 3940
3900 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$
3910 IF ONE$= FIRST$ THEN 3960
3920 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$
3930 GOTO 3890
3940 GOSUB 6070
3950 GOTO 160
3960 GOSUB 6640
3970 PRINT:PRINT "The 4th field reads: "FOURTH$
3980 PRINT:PRINT "Enter RETURN or correct as follows:"
3990 INPUT DD$
4000 IF DD$= "" GOTO 4020
4010 LET FOURTH$= DD$
4020 PRINT:PRINT "The 5th field reads: "FIFTH$
4030 PRINT:PRINT "Enter RETURN or correct as follows:"
4040 INPUT EE$
4050 IF EE$= "" GOTO 4070
4060 LET FIFTH$= EE$
4070 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$
4080 IF EOF (2) THEN 4120
4090 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$
4100 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$
4110 GOTO 4080
4120 GOSUB 6020
4130 IF EOF (1) THEN 4170
4140 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$
4150 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$
4160 GOTO 4130
4170 CLOSE 1,2
4180 GOTO 5890
4190 :
4200 PRINT CHR$(26)
4210 INPUT "Enter the 1st field DATA: ";ONE$
4220 IF EOF (2) THEN 4270
4230 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$
4240 IF ONE$= FIRST$ THEN 4290
4250 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$
4260 GOTO 4220
4270 GOSUB 6070
4280 GOTO 160
4290 GOSUB 6640
4300 GOSUB 6770
4310 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$
4320 IF EOF (2) THEN 4360
4330 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$
4340 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$
4350 GOTO 4320
4360 GOSUB 6020
4370 IF EOF (1) THEN 4410
4380 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$
4390 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$
4400 GOTO 4370
4410 CLOSE 1,2
4420 GOTO 5890
4430 :
4440 PRINT CHR$(26)
4450 INPUT "Enter the 1st field DATA: ";ONE$
4460 IF EOF (2) THEN 4510
4470 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$
4480 IF ONE$= FIRST$ THEN 4530
4490 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$
4500 GOTO 4460
4510 GOSUB 6070
4520 GOTO 160
4530 GOSUB 6640
4540 GOSUB 6770
4550 PRINT:PRINT "The 7th field reads: "SEVENTH$
4560 PRINT:PRINT "Enter RETURN or correct as follows:"
4570 INPUT GG$
4580 IF GG$= "" GOTO 4600
4590 LET SEVENTH$= GG$
4600 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$
4610 IF EOF (2) THEN 4650
4620 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$
4630 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$
4640 GOTO 4610
4650 GOSUB 6020
4660 IF EOF (1) THEN 4700
4670 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$
4680 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$
4690 GOTO 4660
4700 CLOSE 1,2
4710 GOTO 5890
4720 :
4730 PRINT CHR$(26)
4740 INPUT "Enter the 1st field DATA: ";ONE$
4750 IF EOF (2) THEN 4800
4760 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$
4770 IF ONE$= FIRST$ THEN 4820
4780 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$
4790 GOTO 4750
4800 GOSUB 6070
4810 GOTO 160
4820 GOSUB 6640
4830 GOSUB 6770
4840 PRINT:PRINT "The 7th field reads: "SEVENTH$
4850 PRINT:PRINT "Enter RETURN or correct as follows:"
4860 INPUT GG$
4870 IF GG$= "" GOTO 4890
4880 LET SEVENTH$= GG$
4890 PRINT:PRINT "The 8th field reads: "EIGHTH$
4900 PRINT:PRINT "Enter RETURN or correct as follows:"
4910 INPUT HH$
4920 IF HH$= "" GOTO 4940
4930 LET EIGHTH$= HH$
4940 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$
4950 IF EOF (2) THEN 4990
4960 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$
4970 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$
4980 GOTO 4950
4990 GOSUB 6020
5000 IF EOF (1) THEN 5040
5010 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$
5020 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$
5030 GOTO 5000
5040 CLOSE 1,2
5050 GOTO 5890
5060 :
5070 PRINT CHR$(26)
5080 INPUT "Enter the 1st field DATA: ";ONE$
5090 IF EOF (2) THEN 5140
5100 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$
5110 IF ONE$= FIRST$ THEN 5160
5120 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH
5130 GOTO 5090
5140 GOSUB 6070
5150 GOTO 160
5160 GOSUB 6640
5170 GOSUB 6770
5180 PRINT:PRINT "The 7th field reads: "SEVENTH$
5190 PRINT:PRINT "Enter RETURN or correct as follows:"
5200 INPUT GG$
5210 IF GG$= "" GOTO 5230
5220 LET SEVENTH$= GG$
5230 PRINT:PRINT "The 8th field reads: "EIGHTH$
5240 PRINT:PRINT "Enter RETURN or correct as follows:"
5250 INPUT HH$
5260 IF HH$= "" GOTO 5280
5270 LET EIGHTH$= HH$
5280 PRINT:PRINT "The 9th field reads: "NINTH$
5290 PRINT:PRINT "Enter RETURN or correct as follows:"
5300 INPUT II$
5310 IF II$= "" THEN 5330
5320 LET NINTH$= II$
5330 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$
5340 IF EOF (2) THEN 5380
5350 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$
5360 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$
5370 GOTO 5340
5380 GOSUB 6020
5390 IF EOF (1) THEN 5430
5400 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$
5410 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$
5420 GOTO 5390
5430 CLOSE 1,2
5440 GOTO 5890
5450 :
5460 PRINT CHR$(26)
5470 INPUT "Enter the 1st field DATA: ";ONE$
5480 IF EOF (2) THEN 5530
5490 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$,TENTH$
5500 IF ONE$= FIRST$ THEN 5550
5510 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$;TENTH$
5520 GOTO 5480
5530 GOSUB 6070
5540 GOTO 160
5550 GOSUB 6640
5560 GOSUB 6770
5570 PRINT:PRINT "The 7th field reads: "SEVENTH$
5580 PRINT:PRINT "Enter RETURN or correct as follows:"
5590 PRINT:INPUT GG$
5600 IF GG$= "" GOTO 5620
5610 LET SEVENTH$= GG$
5620 PRINT:PRINT "The 8th field reads: "EIGHTH$
5630 PRINT:PRINT "Enter RETURN or correct as follows:"
5640 PRINT:INPUT HH$
5650 IF HH$= "" GOTO 5670
5660 LET EIGHTH$= HH$
5670 PRINT:PRINT "The 9th field reads: "NINTH$
5680 PRINT:PRINT "Enter RETURN or correct as follows:"
5690 PRINT:INPUT II$
5700 IF II$= "" THEN 5720
5710 LET NINTH$= II$
5720 PRINT:PRINT "The 10th field reads: "TENTH$
5730 PRINT:PRINT "Enter RETURN or correct as follows:"
5740 PRINT:INPUT JJ$
5750 IF JJ$= "" THEN 5770
5760 LET TENTH$= JJ$
5770 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$;TENTH$
5780 IF EOF (2) THEN 5820
5790 INPUT #2,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$,TENTH$
5800 WRITE #1,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$;TENTH$
5810 GOTO 5780
5820 GOSUB 6020
5830 IF EOF (1) THEN 5870
5840 INPUT #1,FIRST$,SECOND$,THIRD$,FOURTH$,FIFTH$,SIXTH$,SEVENTH$,EIGHTH$,NINTH$,TENTH$
5850 WRITE #2,FIRST$;SECOND$;THIRD$;FOURTH$;FIFTH$;SIXTH$;SEVENTH$;EIGHTH$;NINTH$;TENTH$
5860 GOTO 5830
5870 CLOSE 1,2
5880 :
5890 PRINT CHR$(26)
5900 PRINT "Do you have another correction for "FILE$
5910 PRINT:INPUT XX$
5920 IF XX$= "YES" THEN 200
5930 IF XX$= "yes" THEN 200
5940 IF XX$= "Yes" THEN 200
5950 IF XX$= "Y" THEN 200
5960 IF XX$= "y" THEN 200
5970 GOTO 6600
5980 CLOSE
5990 END
6000 :
6010 REM *** SUB-ROUTINES ***
6020 CLOSE 1,2
6030 OPEN "I",1,"B:COPY.DAT"
6040 OPEN "O",2,FILE$
6050 RETURN
6060 :
6070 PRINT CHR$(26):PRINT CHR$(7)
6080 PRINT:PRINT "I cannot locate the record for "ONE$
6090 PRINT "in "FILE$"."
6100 PRINT:PRINT "Check your file name."
6110 CLOSE 1,2
6120 RETURN
6130 :
6140 PRINT CHR$(26)
6150 PRINT:PRINT FIRST$": ";
6160 INPUT ONE$
6170 IF ONE$= "" GOTO 2000
6180 PRINT:PRINT SECOND$": ";
6190 INPUT TWO$
6200 PRINT:PRINT THIRD$": ";
6210 INPUT THREE$
6220 RETURN
6230 :
6240 PRINT:PRINT FOURTH$": ";
6250 INPUT FOUR$
6260 PRINT:PRINT FIFTH$": ";
6270 INPUT FIVE$
6280 PRINT:PRINT SIXTH$": ";
6290 INPUT SIX$
6300 RETURN
6310 :
6320 PRINT CHR$(26)
6330 PRINT:INPUT "Enter name of 1st field: ",FIRST$
6340 IF FIRST$= "" THEN 2000
6350 PRINT:INPUT "Enter name of 2nd field: ",SECOND$
6360 PRINT:INPUT "Enter name of 3rd field: ",THIRD$
6370 RETURN
6380 :
6390 PRINT:INPUT "Enter name for 4th field: ",FOURTH$
6400 PRINT:INPUT "Enter name for 5th field: ",FIFTH$
6410 PRINT:INPUT "Enter name for 6th field: ",SIXTH$
6420 RETURN
6430 CLOSE 2
6440 KILL FILE$
6450 RETURN
6460 :
6470 PRINT:INPUT "Enter DATA for 1st field: ",AAA$
6480 IF AAA$= "" THEN GOTO 6580
6490 PRINT:INPUT "Enter DATA for 2nd field: ",BBB$
6500 PRINT:INPUT "Enter DATA for 3rd field: ",CCC$
6510 RETURN
6520 :
6530 PRINT:INPUT "Enter DATA for 4th field: ",DDD$
6540 PRINT:INPUT "Enter DATA for 5th field: ",EEE$
6550 PRINT:INPUT "Enter DATA for 6th field: ",FFF$
6560 RETURN
6570 :
6580 CLOSE 1
6590 NAME "B:COPY.DAT" AS FILE$
6600 PRINT CHR$(26)
6610 PRINT "Your new DATA has been added to "FILE$"."
6620 GOTO 770
6630 :
6640 PRINT:PRINT "The 2nd field for the record of "FIRST$
6650 PRINT "reads: "SECOND$
6660 PRINT:PRINT "Enter RETURN or correct as follows: "
6670 INPUT BB$
6680 IF BB$= "" GOTO 6700
6690 LET SECOND$= BB$
6700 PRINT:PRINT "The 3rd field reads: "THIRD$
6710 PRINT:PRINT "Enter RETURN or correct as follows:"
6720 INPUT CC$
6730 IF CC$= "" THEN RETURN
6740 LET THIRD$= CC$
6750 RETURN
6760 :
6770 PRINT:PRINT "The 4th field reads: "FOURTH$
6780 PRINT:PRINT "Enter RETURN or correct as follows:"
6790 INPUT DD$
6800 IF DD$= "" GOTO 6820
6810 LET FOURTH$= DD$
6820 PRINT:PRINT "The 5th field reads: "FIFTH$
6830 PRINT:PRINT "Enter RETURN or correct as follows:"
6840 INPUT EE$
6850 IF EE$= "" GOTO 6870
6860 LET FIFTH$= EE$
6870 PRINT:PRINT "The 6th field reads: "SIXTH$
6880 PRINT:PRINT "Enter RETURN or correct as follows:"
6890 INPUT FF$
6900 IF FF$= "" THEN RETURN
6910 LET SIXTH$= FF$
6920 RETURN
T:PRINT "Enter RETURN or correct as follows:"
6890 INPUT FF$
6900 IF FF$= "" THEN RETURN
6910 LET SIXTH$= FF$
6920 R