     rem This is the Yearly File Maintenance Program

%INCLUDE ALL.BAS
     dim n(2,20)
     RESTORE
1500 PRINT clear$:PRINT
1510 PRINT "THIS IS THE YEARLY FILE MAINTENANCE PROGRAM....."
1520 PRINT:PRINT"IT DOES THE FOLLOWING:"
1530 PRINT:PRINT"POSTS ALL CURRENT GENERAL LEDGER AMOUNTS TO PREVIOUS"
1540 PRINT:PRINT"POSTS ALL CURRENT GENERAL LEDGER AMOUNTS TO ZERO"
1550 PRINT:PRINT"UPDATES CUSTOMER AND VENDOR AGING DATA"
1560 PRINT:PRINT"ZEROS QUARTER AND YEAR TO DATE PAYROLL AMOUNTS"
1570 PRINT:PRINT"ZEROS MONTH, QUARTER, AND YEAR TO DATE 'QUANTITY"
1580 PRINT:PRINT"ISSUED' FIGURES."
1590 PRINT:INPUT"TO CONTINUE TYPE CARRIAGE RETURN ";line temp$
2000 PRINT clear$:PRINT
2010 PRINT "INSTALL GENERAL LEDGER DISK IN DRIVE B."
2020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
2040 PRINT "CHECKING FILE LENGTH"
2050 PRINT:PRINT "*** PLEASE WAIT ***"
2060 open "b:gl" recl 138 as 1
     z3=(size("b:gl")*block.size)/138
2080 FOR Z2=1 TO Z3
2090 read #1,z2;N(2,1),N(2,2),N$
2100 IF N(2,2)=0 THEN 2120
2110 NEXT Z2
2120 Z3=Z3-1
2130 close 1
2140 Z2=Z2-1
2200 PRINT clear$:PRINT
2210 PRINT "GENERAL LEDGER ACCOUNTS = ";Z2
2220 PRINT:PRINT "*** POSTING ***"
2500 open "b:gl" recl 138 as 1
2505 FOR Z=1 TO Z2
2510 N$=""
2520 read #1,z;N(2,1),N(2,2),N$,G1,G2,G3,G4,G5,G6,G7
2530 G6=G3:G5=G2:G4=G1:G3=0:G2=0:G1=0
2540 print #1,z;N(2,1),N(2,2),N$,G1,G2,G3,G4,G5,G6,G7
2550 NEXT Z
2560 close 1
3000 PRINT clear$:PRINT
3010 PRINT "INSTALL CUSTOMER RECEIVABLES DISK IN DRIVE B."
3020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
3040 PRINT "CHECKING FILE LENGTH"
3050 PRINT:PRINT "*** PLEASE WAIT ***"
3060 open "b:cr" recl 384 as 1
     z3=(size("b:cr")*block.size)/384
3080 FOR Z2=1 TO Z3
3090 read #1,z2;N(2,1),N(2,2),N$
3100 IF N(2,2)=0 THEN 3120
3110 NEXT Z2
3120 Z3=Z3-1
3130 close 1
3140 Z2=Z2-1
3200 PRINT clear$:PRINT
3210 PRINT "CUSTOMER RECEIVABLES ACCOUNTS = ";Z2
3220 PRINT:PRINT "*** POSTING ***"
3500 open "b:cr" recl 384 as 1
3510 FOR Z=1 TO Z2
3520 read #1,z2;n(2,1),n(2,2),n$,c1,c2,c3,c4,c5,c6
3530 C6=C6+C5:C5=C4:C4=C3:C3=0
3540 print #1,z2;n(2,1),n(2,2),n$,c1,c2,c3,c4,c5,c6
3550 NEXT Z
3560 close 1
4000 PRINT clear$:PRINT
4010 PRINT "INSTALL VENDOR PAYABLES DISK IN DRIVE B."
4020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
4040 PRINT "CHECKING FILE LENGTH"
4050 PRINT:PRINT "*** PLEASE WAIT ***"
4060 open "b:vp" recl 384 as 1
     z3=(size("b:vp")*block.size)/384
4080 FOR Z2=1 TO Z3
4090 read #1,z2;N(2,1),N(2,2),N$
4100 IF N(2,2)=0 THEN 4120
4110 NEXT Z2
4120 Z3=Z3-1
4130 close 1
4140 Z2=Z2-1
4200 PRINT clear$:PRINT
4210 PRINT "VENDOR PAYABLES ACCOUNTS = ";Z2
4220 PRINT:PRINT "*** POSTING ***"
4500 open "b:vp" recl 384 as 1
4510 FOR Z=1 TO Z2
4520 read #1,z;n(2,1),n(2,2),n$,v1,v2,v3,v4,v5,v6
4530 V6=V6+V5:V5=V4:V4=V3:V3=0
4540 print #1,z;n(2,1),n(2,2),n$,v1,v2,v3,v4,v5,v6
4550 NEXT Z
4560 close 1
5000 PRINT clear$:PRINT
5010 PRINT "INSTALL EMPLOYEE PAYROLL DISK IN DRIVE B."
5020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
5040 PRINT "CHECKING FILE LENGTH"
5050 PRINT:PRINT "*** PLEASE WAIT ***"
5060 open "b:ep" recl 512 as 1
     z3=(size("b:ep")*block.size)/512
5080 FOR Z2=1 TO Z3
5090 read #1,z2;N(2,1),N(2,2),N$
5100 IF N(2,2)=0 THEN 5120
5110 NEXT Z2
5120 Z3=Z3-1
5130 close 1
5140 Z2=Z2-1
5200 PRINT clear$:PRINT
5210 PRINT "EMPLOYEE PAYROLL ACCOUNTS = ";Z2
5220 PRINT:PRINT "*** POSTING ***"
5500 open "b:ep" recl 512 as 1
5505 FOR Z=1 TO Z2
5510 N$=""
5515 read #1,z;N(2,1),N(2,2),N$,N,R,H1,H2,H3,\
          E0,E1,E2,F1,F2,F3,E3,E4,E5,E6,E7,E8,S1,S2,S3,M1,M2,M3
5525 H2=0:S2=0:M2=0:E1=0:E4=0:E7=0:F2=0
5530 H3=0:S3=0:M3=0:E2=0:E5=0:E8=0:F3=0
5535 print #1,z;N(2,1),N(2,2),N$,N,R,H1,H2,H3,\
          E0,E1,E2,F1,F2,F3,E3,E4,E5,E6,E7,E8,S1,S2,S3,M1,M2,M3
5550 NEXT Z
5560 close 1
6000 PRINT clear$:PRINT
6010 PRINT "INSTALL FINISHED GOODS DISK IN DRIVE B."
6020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
6040 PRINT "CHECKING FILE LENGTH"
6050 PRINT:PRINT "*** PLEASE WAIT ***"
6060 open "b:fg" recl 256 as 1
     z3=(size("b:fg")*block.size)/256
6080 FOR Z2=1 TO Z3
6090 read #1,z2;N(2,1),N(2,2),N$
6100 IF N(2,2)=0 THEN 6120
6110 NEXT Z2
6120 Z3=Z3-1
6130 close 1
6140 Z2=Z2-1
6200 PRINT clear$:PRINT
6210 PRINT "FINISHED GOODS ACCOUNTS = ";Z2
6220 PRINT:PRINT "*** POSTING ***"
6500 open "b:fg" recl 256 as 1
6505 FOR Z=1 TO Z2
6510 N$=""
6520 read #1,z;N(2,1),N(2,2),N$,F0,F1,F2,F3,F4,F5,F6,F7,F8,F9
6530 F5=0:F6=0:F7=0
6540 print #1,z;N(2,1),N(2,2),N$,F0,F1,F2,F3,F4,F5,F6,F7,F8,F9
6550 NEXT Z
6560 close 1
7000 PRINT clear$:PRINT
7010 PRINT "INSTALL RAW GOODS DISK IN DRIVE B."
7020 PRINT:INPUT "TO CONTINUE TYPE CARRIAGE RETURN. ";line temp$
     initialize
7040 PRINT "CHECKING FILE LENGTH"
7050 PRINT:PRINT "*** PLEASE WAIT ***"
7060 open "b:rg" recl 256 as 1
     z3=(size("b:rg")*block.size)/256
7080 FOR Z2=1 TO Z3
7090 read #1,z2;N(2,1),N(2,2),N$
7100 IF N(2,2)=0 THEN 7120
7110 NEXT Z2
7120 Z3=Z3-1
7130 close 1
7140 Z2=Z2-1
7200 PRINT clear$:PRINT
7210 PRINT "RAW GOODS ACCOUNTS = ";Z2
7220 PRINT:PRINT "*** POSTING ***"
7500 open "b:rg" recl 256 as 1
7505 FOR Z=1 TO Z2
7510 N$=""
7520 read #1,z;N(2,1),N(2,2),N$,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9
7530 R5=0:R6=0:R7=0
7540 print #1,z;N(2,1),N(2,2),N$,R0,R1,R2,R3,R4,R5,R6,R7,R8,R9
7550 NEXT Z
7560 close 1
9995 CHAIN "bizmii"
