5 DIM X$(210):DIM Y$(210)
7 DEFDBL A,B,X
10 'CHECK REGISTER PROGRAM
20 'CORINDEN PROGRAM
30 'COPYRIGHT HARRY HAYMAN -1985
35 GOSUB 2000
40 PRINT CHR$(26):PRINT:PRINT:PRINT
50 PRINT TAB(20) "PROGRAM TO CORRECT INDIVIDUAL ENTRIES"
60 PRINT TAB(20) "   COPYRIGHT - HARRY HAYMAN - 1985"
70 PRINT:PRINT:PRINT TAB(23)"********************************":PRINT
80 PRINT TAB(17) "TO END PROGRAM TYPE 0 FOR ITEM TO BE CHANGED"
90 PRINT:PRINT TAB(23)"********************************":PRINT:PRINT
100 INPUT "ENTER ENTRY NUMBER OF ITEM TO BE CHANGED";A
110 IF A=0 THEN RUN "CHECKREG"
120 'READ ENTRY FROM 
130 OPEN "R",#1,"B:ENTRIES",136
140 GOSUB 820
150 GET #1,A
155 IF EOF(1) GOTO 1500
160 CLOSE #1
170 AB1$=AA1$:AB2$=AA2$:AB3$=AA3$:AB4$=AA4$:AB5$=AA5$:AB6$=AA6$:AB7$=AA7$
180 AB8$=AA8$:AB9$=AA9$:AB10$=AA10$:AB11$=AA11$:AC1$=AC$:AD1$=AD$
190 PRINT CHR$(26):PRINT:PRINT:PRINT
200 A5=VAL(AA5$):A4=VAL(AA4$):A6=VAL(AA6$):A7=VAL(AA7$):A8=VAL(AA8$):A9=VAL(AA9$):A10=VAL(AA10$):A11=VAL(AA11$)
210 PRINT "1.  CHECK NUMBER  ";AB1$
220 PRINT "2.  DATE          ";AB2$
230 PRINT "3.  PAYEE         ";AB3$
240 PRINT "4.  AMOUNT (DEPOSITS SHOULD BE PRECEEDED BY -)  ";AB4$
245 A5=VAL(AB5$)
250 PRINT "5.  ACCOUNT TO BE DEBITED   ";AB5$,Y$(A5)
260 PRINT
270  PRINT "6.  AMOUNT TO BE CHARGED   ";AB6$
275 A7=VAL(AB7$)
280 PRINT "7.  ACCOUNT TO BE CHARGED   ";AB7$,Y$(A7)
290 PRINT
300 PRINT "8.  AMOUNT TO BE CHARGED    ";AB8$
305 A9=VAL(AB9$)
310 PRINT"9.  ACCOUNT TO BE CHARGED   ";AB9$,Y$(A9)
320 PRINT
330 PRINT "10. AMOUNT TO BE CHARGED    ";AB10$
335 A11=VAL(AB11$)
340 PRINT "11. ACCOUNT TO BE CHARGED   ";AB11$,Y$(A11)
350 PRINT
360 PRINT "12. REMARKS                 ";AC1$
370 PRINT "13. HAS CHECK CLEARED       ";AD1$
380 INPUT "IS THE ABOVE ENTRY CORRECT  ";Q$
390 IF Q$="YES" THEN GOTO 1310
400 INPUT "NUMBER OF ENTRY TO BE CHANGED";Q
410 LINE INPUT "WHAT SHOULD THIS ENTRY BE  ";P$
420 IF Q=1 THEN GOSUB 560
430 IF Q=2 THEN GOSUB 580              
440 IF Q=3 THEN GOSUB 600               
450 IF Q=4 THEN GOSUB 620
460 IF Q=5 THEN GOSUB 640
470 IF Q=6 THEN GOSUB 660
480 IF Q=7 THEN GOSUB 680
490 IF Q=8 THEN GOSUB 700
500 IF Q=9 THEN GOSUB 720
510 IF Q=10 THEN GOSUB 740
520 IF Q=11 THEN GOSUB 760
530 IF Q=12 THEN GOSUB 780
540 IF Q=13 THEN GOSUB 800
550 GOTO 190
560 AB1$=P$
570 RETURN
580 AB2$=P$
590 RETURN
600 AB3$=P$
610 RETURN
620 AB4$=P$
630 RETURN
640 AB5$=P$
650 RETURN
660 AB6$=P$
670 RETURN
680 AB7$=P$
690 RETURN
700 AB8$=P$
710 RETURN
720 AB9$=P$
730 RETURN
740 AB10$=P$
750 RETURN
760 AB11$=P$
770 RETURN
780 AC1$=P$
790 RETURN
800 AD1$=P$
810 RETURN
820 FIELD #1,4 AS AA1$,15 AS AA2$,25 AS AA3$,9 AS AA4$,4 AS AA5$,9 AS AA6$,4 AS AA7$,9 AS AA8$,4 AS AA9$,9 AS AA10$,4 AS AA11$,39 AS AC$,1 AS AD$
830 RETURN
840 OPEN "R",#1,"B:BALANCE",58
850 FIELD #1,9 AS X1$,9 AS X2$,9 AS X3$,9 AS X4$,9 AS X5$,9 AS X6$,4 AS ZZ$
860 GET #1,1
870 CLOSE #1
880 X1=CVD(X1$):X2=CVD(X2$):X3=CVD(X3$)
890 IF A5=1 THEN X1=X1+A4
900 IF A5=2 THEN X2=X2+A4
910 IF A5=3 THEN X3=X3+A4
920 IF B5=1 THEN X1=X1-B4
930 IF B5=2 THEN X2=X2-B4
940 IF B5=3 THEN X3=X3-B4
950 IF A7=1 THEN X1=X1+A6
960 IF A7=2 THEN X2=X2+A6
970 IF A7=3 THEN X3=X3+A6
980 IF B7=1 THEN X1=X1-B6
990 IF B7=2 THEN X2=X2-B6
1000 IF B7=3 THEN X3=X3-B6
1010 IF A9=1 THEN X1=X1+A8
1020 IF A9=2 THEN X2=X2+A8
1030 IF A9=3 THEN X3=X3+A8
1040 IF B9=1 THEN X1=X1-B8
1050 IF B9=2 THEN X2=X2-B8
1060 IF B9=3 THEN X3=X3-B8
1070 IF A11=1 THEN X1=X1+A10
1080 IF A11=2 THEN X2=X2+A10
1090 IF A11=3 THEN X3=X3+A10
1100 IF B11=1 THEN X1=X1-B10
1110 IF B11=2 THEN X2=X2-B10
1120 IF B11=3 THEN X3=X3-B10
1130 OPEN "R",#1,"B:BALANCE",58
1140 FIELD #1,9 AS X1$,9 AS X2$,9 AS X3$,9 AS X4$,9 AS X5$,9 AS X6$,4 AS ZZ$
1150 LSET X1$=MKD$(X1):LSET X2$=MKD$(X2):LSET X3$=MKD$(X3)
1160 LSET X4$=X4$:LSET X5$=X5$:LSET X6$=X6$:LSET ZZ$=ZZ$
1170 PUT #1,1
1180 CLOSE #1
1190 GOTO 40
1200 'TO REENTER CORRECTED ENTRIES
1210 B5=VAL(AB5$):B4=VAL(AB4$):B6=VAL(AB6$):B7=VAL(AB7$):B8=VAL(AB8$):B9=VAL(AB9$):B10=VAL(AB10$):B11=VAL(AB11$)
1220 OPEN "R",#1,"B:ENTRIES",136
1230 GOSUB 820
1240 LSET AA1$=AB1$:LSET AA2$=AB2$:LSET AA3$=AB3$:LSET AA4$=AB4$
1250 LSET AA5$=AB5$:LSET AA6$=AB6$:LSET AA7$=AB7$:LSET AA8$=AB8$
1260 LSET AA9$=AB9$:LSET AA10$=AB10$:LSET AA11$=AB11$:LSET AC$=AC1$
1270 LSET AD$=AD1$
1280 PUT #1,A
1290 CLOSE #1
1300 GOTO 840
1310 IF ABS(VAL(AB4$)+VAL(AB6$)+VAL(AB8$)+VAL(AB10$))<.01 THEN GOTO 1200
1320 PRINT CHR$(26):PRINT:PRINT:PRINT
1330 PRINT TAB(10) "THE TOTAL OF THE AMOUNT DEBITED MUST EQUAL THE AMOUNT"
1340 PRINT TAB(12) "CHARGED - PLEASE CHECK THE SIGNS OF ALL VALUES"
1350 FOR N=1 TO 2000:NEXT N
1360 GOTO 190
1500 CLOSE #1
1510 PRINT CHR$(26):PRINT:PRINT:PRINT
1520 PRINT TAB(10) "YOU HAVE PASSED THE END OF THE FILE, PLEASE"
1530 PRINT TAB(10) "REENTER YOUR ENTRY NUMBER"
1540 FOR N=1 TO 2000:NEXT N
1550 GOTO 40
2000 PRINT CHR$(26):FOR N=1 TO 6:PRINT:NEXT N
2010 Z=1
2020 PRINT TAB(20) "READING ACCOUNT NUMBER"
2030 OPEN "R",#1,"B:ACCOUNTS",28
2040 FIELD #1,3 AS CC1$,25 AS CC2$
2050 GET #1,Z
2060 IF EOF(1) GOTO 2200
2070 CLOSE #1
2080 X$(Z)=CC1$:Y$(Z)=CC2$
2085 PRINT CHR$(27) CHR$(46)+"0"
2090 PRINT TAB(25) CHR$(27)+"="CHR$(40):PRINT TAB(25)Z
2100 Z=Z+1
2110 GOTO 2030
2200 PRINT CHR$(27) CHR$(46)+"2":CLOSE #1
2210 RETURN
B(25) CHR$(27)+"="CHR$(40):PRINT TAB