1     rem This is the Monthly File Maintenance Program

%INCLUDE ALL.BAS
500     dim n(2,20)
     RESTORE
1500 PRINT clear$:PRINT
1510 PRINT "THIS IS THE MONTHLY FILE MAINTENANCE PROGRAM....."
1520 PRINT:PRINT"IT DOES THE FOLLOWING:"
1530 PRINT:PRINT"POSTS ALL M-T-D GENERAL LEDGER AMOUNTS TO PREVIOUS"
1540 PRINT:PRINT"POSTS ALL M-T-D GENERAL LEDGER AMOUNTS TO ZERO"
1550 PRINT:PRINT"UPDATES CUSTOMER AND VENDOR AGING DATA"
1570 PRINT:PRINT"ZEROS MONTH 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 "gl" recl 138 as 1
     z3=(size("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 "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 G4=G1:G1=0
      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 "cr" recl 384 as 1
     z3=(size("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 "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 "vp" recl 384 as 1
     z3=(size("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 "vp" recl 384 as 1
4510 FOR Z=1 TO Z2
4520 read #1,z2;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,z2;n(2,1),n(2,2),n$,v1,v2,v3,v4,v5,v6
4550 NEXT Z
4560 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 "fg" recl 256 as 1
     z3=(size("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 "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
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 "rg" recl 256 as 1
     z3=(size("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 "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
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"
