1  COM Z0$[45],Z1$[45],H
10  REM**Program to create, search, delete, and sort a mailing list  for
20  REM**                CRISIS COMPUTER CORPERATION
30  REM**Adding new names is done by way of a seperate Add file  which
40  REM**is presorted and kept in a direct access file. Mergeing is accomplished
50  REM**by a seperate function. Deletes are done by marking the first data
60  REM**feild for no print and clearing it on the next sort.
70  REM***Written by Bob Anderson, 5 Feb 81.***
90  REM
100  F=1
110  PRINT "                         *******************"
120  PRINT "                         * CRISIS COMPUTER *"
130  PRINT "                         *   MAIL  SYSTEM  *"
140  PRINT "                         *  MAINT. PROGRAM *"
145  PRINT "                         *******************"
150  PRINT 
160  PRINT 
170  PRINT 
180  GOTO 190
190  DIM A$[38],B$[38],C$[38],D$[38],E$[38],F$[38],G$[38],I$[38]
200  DIM N1$[38],I1$[38],R1$[38],T1$[38],K1$[38],G1$[38]
210  DIM K$[35],L$[38],M$[38],N$[38],O$[38],Q$[72],R$[38],S$[38]
220  DIM T$[38],U$[38],W$[38],Y$[38],Z$[38]
230  DIM W1$[10],X1$[10],Y1$[10]
240  DIM J$[72],P$[5],A0$[73]
250  DIM X$[10],H$[72],H1$[72],Y0$[10]
260  FILES *,*,*,*
530  CHAIN R,"MMAIL.A000",100
535  STOP 
540  REM***Add Section***
545  H=1
550  PRINT LIN(5)"*****Add Routine*****"
560  PRINT LIN(3)"(cr)=null input"
570  PRINT " /E=backstep one line"
580  PRINT "  0=return to menu"
590  PRINT "  ?=instructions"
600  GOTO 620
610  PRINT "... WAIT"'7
620  ASSIGN Z1$,1,X1
625  F9=0
630  IF  END #1 THEN 4310
640  READ #1,1;N
650  IF  END #1 THEN 4280
660  READ #1,N+2
665  ASSIGN *,1
670  PRINT LIN(3)"Name of Contact ";
680  N$=""
690  LINPUT N$
700  N$=UOS$(N$)
710  IF N$="" THEN 780
720  IF N$#"?" THEN 760
740  GOTO 4321
750  GOTO 670
760  IF N$#"0" THEN 820
770  GOTO 530
780  PRINT "*****INCORECT NULL..MUST USE THIS LINE!"'7
790  PRINT LIN(2)
800  GOTO 670
810  GOTO 530
820  PRINT "Company ";
830  I$=""
840  LINPUT I$
850  I$=UOS$(I$)
860  IF I$="/E" THEN 670
870  IF I$="0" THEN 530
880  GOTO 890
890  PRINT "Address ";
900  R$=""
910  LINPUT R$
920  R$=UOS$(R$)
930  IF R$="/E" THEN 820
940  PRINT "City,State ";
950  T$=""
960  LINPUT T$
970  T$=UOS$(T$)
980  IF T$="/E" THEN 890
990  PRINT "Zip code ";
1000  K$=""
1010  LINPUT K$
1020  K$=UOS$(K$)
1030  IF K$="/E" THEN 940
1040  IF LEN(K$)#5 THEN 990
1050  GOTO 1070
1060  PRINT "10 digits, please!"'7
1070  PRINT "Phone # (1111111111)";
1080  G$=""
1090  LINPUT G$
1100  G$=UOS$(G$)
1110  IF G$[1,2]="/E" THEN 990
1115  IF G$#"" THEN 1118
1117  G$="0000000000"
1118  PRINT G$
1120  IF LEN(G$)#10 THEN 1060
1130  PRINT LIN(2)"Customer Code: (enter A for all)"
1140  PRINT LIN(2)"  Type > "
1210  H$=""
1230  LINPUT H$
1240  H$=UOS$(H$)
1260  PRINT LIN(2);"  Subtype : ";
1270  J$=""
1280  LINPUT J$
1285  J$=UOS$(J$)
1295  PRINT LIN(2);"  Class : ";
1436  G1$=""
1437  LINPUT G1$
1438  G1$=UOS$(G1$)
1500  H$[LEN(H$)+1]=J$
1510  H$[LEN(H$)+1]=G1$
4000  REM***ADD SORT***
4005  ASSIGN Z1$,1,R1
4006  IF R1#0 THEN 4005
4010  IF N#0 THEN 4040
4020  R=2
4030  GOTO 4140
4040  F=2
4050  L=N+1
4060  R=INT((F+L)/2)
4070  READ #1,R;N1$,I1$,R1$,T1$,K1$,G1$,H1$
4080  IF K$<K1$ THEN 4190
4090  IF K$>K1$ THEN 4220
4100  FOR I=N+1 TO R STEP -1
4110  READ #1,I;N1$,I1$,R1$,T1$,K1$,G1$,H1$
4120  PRINT #1,I+1;N1$,I1$,R1$,T1$,K1$,G1$,H1$
4130  NEXT I
4140  PRINT #1,R;N$,I$,R$,T$,K$,G$,H$
4150  PRINT #1,1;N+1
4160  ASSIGN *,1
4170  ENTER 5,X,X
4175  IF F9=6 THEN 4330
4180  GOTO 610
4190  L=R
4200  IF F#L THEN 4060
4210  GOTO 4100
4220  F=R
4230  IF L-F>1 THEN 4060
4240  R=R+1
4250  IF L-F#1 THEN 4100
4260  F=F+1
4270  GOTO 4060
4280  PRINT "FILE FULL::: Sort and Reenter!!"'7'7'7
4290  ASSIGN *,1
4300  GOTO 530
4310  N=0
4320  GOTO 660
4321  PRINT "The add function adds and sorts in zip code order, new entries"
4322  PRINT "and places them in the add file. Follow the prompts carefully."
4323  PRINT LIN(3)
4324  GOTO 550
4330  REM***FILE CHANGE SECTION***
4340  PRINT LIN(3)"*****File Change Routine*****"
4345  H=1
4350  PRINT "/E=backstep one line"
4360  PRINT " 0=return to menu"
4370  PRINT " ?=instructions"
4372  ASSIGN *,1
4374  PRINT "...wait"'7
4380  ASSIGN Z0$,1,X3
4390  IF X3=6 THEN 4374
4400  PRINT LIN(2)"find by (C/P) ";
4410  LINPUT P$
4420  P$=UOS$(P$)
4430  IF P$[1,1]="C" THEN 4500
4440  IF P$[1,1]="0" THEN 530
4450  IF P$#"?" THEN 4490
4470  GOTO 5031
4480  GOTO 4500
4490  GOTO 4520
4500  PRINT "Type the company to be changed ";
4510  GOTO 4530
4520  PRINT "Type the person to be changed ";
4530  READ #1,1
4540  C=0
4550  G=0
4560  LINPUT L$
4570  L$=UOS$(L$)
4580  IF L$="/E" THEN 4400
4590  IF L$="0" THEN 530
4600  IF  END #1 THEN 4680
4610  READ #1;N$,I$,R$,T$,K$,G$,H$
4615  C=C+1
4620  LET F=LEN(L$)
4630  IF P$[1,1]="C" THEN 4660
4640  IF N$[1,F]=L$[1,F] THEN 4730
4650  GOTO 4670
4660  IF I$[1,F]=L$[1,F] THEN 4730
4670  GOTO 4610
4680  PRINT "NO SUCH NAME"'7
4690  PRINT 
4700  GOTO 4400
4710  PRINT 
4720  PRINT "DO YOU WISH TO CHANGE : "'7
4730  PRINT LIN(2);N$
4740  PRINT I$
4750  PRINT R$
4760  PRINT T$
4770  PRINT K$
4780  PRINT LIN(1);"(";G$[1,3];")";G$[4,6];"-";G$[7,10]
4790  PRINT H$
4795  PRINT LIN(2)"this one? ";
4800  LINPUT U$
4810  U$=UOS$(U$)
4820  IF U$[1,1]#"Y" THEN 4610
4830  READ #1,1
4840  ADVANCE #1;(C-1)*7,R
4850  UPDATE #1;'25'25'25
4860  PRINT "Old entry marked 'delete'; Item now reads : "
4870  PRINT "#1 > ";N$
4880  PRINT "#2 > ";I$
4890  PRINT "#3 > ";R$
4900  PRINT "#4 > ";T$
4910  PRINT "#5 > ";K$
4920  PRINT "#6 > ";G$
4930  PRINT "#7 > ";H$
4940  PRINT LIN(2);"Which number are you changing ? (0=as is) ";
4945  ASSIGN *,1
4949  X=0
4950  INPUT X
4952  IF X=0 THEN 5012
4955  IF X >= 0 OR X<8 THEN 4965
4960  PRINT "PICK A NUMBER BETWEEN 1 & 7,PLEASE."'7
4962  GOTO 4940
4965  GOTO X OF 4970,4976,4982,4988,4994,5000,5006
4970  PRINT "Old name= ";N$;" New Name= ";
4972  INPUT N$
4974  GOTO 4860
4976  PRINT "Old company = ";I$;" New company = ";
4978  INPUT I$
4980  GOTO 4860
4982  PRINT "Old address = ";R$;" New address = ";
4984  INPUT R$
4986  GOTO 4860
4988  PRINT "Old City,State = ";T$;" New City,State = ";
4990  INPUT T$
4992  GOTO 4860
4994  PRINT "Old ZIP = ";K$;" New ZIP = ";
4996  INPUT K$
4998  GOTO 4860
5000  PRINT "Old Phone # = ";G$;" New Phone # = ";
5002  INPUT G$
5004  GOTO 4860
5006  PRINT "Old Customer code = ";H$;" New code is : ";
5008  INPUT H$
5009  IF LEN(H$)#3 THEN 5006
5010  GOTO 4860
5012  ASSIGN Z1$,1,X1, PR 
5014  IF  END #1 THEN 5018
5016  GOTO 5020
5018  N=0
5019  GOTO 5024
5020  READ #1,1;N
5022  IF  END #1 THEN 4280
5024  READ #1,N+2
5025  F9=6
5028  GOTO 4000
5031  PRINT "This function allows for file maintaince.  This is accomplished"
5041  PRINT "by deleting the old entry and keeping the changed entry to the"
5051  PRINT "add file.  The items to be deleted may be searched by contact name"
5052  PRINT "or by company name. Follow the prompts carefully."
5061  PRINT LIN(3)
5071  GOTO 4330
5280  REM***Delete Section***
5290  PRINT LIN(3)"*****Delete Routine*****"
5295  H=1
5300  PRINT "/E=backstep one line"
5310  PRINT " 0=return to menu"
5320  PRINT " ?=instructions"
5330  PRINT "System master file deletion ?";
5340  Y$="N"
5350  LINPUT Y$
5360  IF Y$[1,1]="0" THEN 530
5370  IF Y$[1,1]="Y" THEN 5410
5380  PRINT "Add file assigned.."
5390  ASSIGN Z1$,1,R
5400  GOTO 5450
5410  ASSIGN *,1
5420  PRINT "... WAIT"'7
5430  ASSIGN Z0$,1,X3, PR 
5440  IF X3=6 THEN 5420
5450  PRINT LIN(2)"Delete by (C/P) ";
5460  LINPUT P$
5470  P$=UOS$(P$)
5480  IF P$[1,1]="C" THEN 5550
5490  IF P$="0" THEN 530
5500  IF P$#"?" THEN 5540
5520  GOTO 6201
5530  GOTO 5450
5540  GOTO 5570
5550  PRINT "Type the company to be deleted ";
5560  GOTO 5580
5570  PRINT "Type the person to be deleted ";
5580  READ #1,1
5590  C=0
5600  G=0
5610  INPUT L$
5620  L$=UOS$(L$)
5630  IF L$="/E" THEN 5450
5640  IF Y$[1,1]="Y" THEN 5700
5650  IF  END #1 THEN 5860
5660  J=1
5670  J=J+1
5680  READ #1,J;N$,I$,R$,T$,K$,G$,H$
5690  GOTO 5790
5700  GOTO 5740
5710  READ #1,1
5720  C=0
5730  G=1
5740  IF L$="0" THEN 530
5750  READ #1,1
5760  IF  END #1 THEN 5860
5770  C=C+1
5780  READ #1;N$,I$,R$,T$,K$,G$,H$
5790  IF G=1 THEN 5900
5800  LET F=LEN(L$)
5810  IF P$[1,1]="C" THEN 5840
5820  IF N$[1,F]=L$[1,F] THEN 5900
5830  GOTO 5850
5840  IF I$[1,F]=L$[1,F] THEN 5900
5850  GOTO 5770
5860  PRINT "No such name"
5870  PRINT '7'7'7
5880  PRINT 
5890  GOTO 5330
5900  PRINT 
5910  PRINT "Do you wish to delete :"
5920  PRINT '7'7'7;
5930  PRINT 
5940  PRINT N$
5950  PRINT I$
5960  PRINT R$
5970  PRINT T$
5980  PRINT K$
5990  PRINT 
6000  PRINT "(";G$[1,3];")";" ";G$[4,6];" ";"- ";G$[7,10]
6010  PRINT H$
6020  LINPUT U$
6030  U$=UOS$(U$)
6040  IF Y$[1,1]#"Y" THEN 6140
6050  IF U$[1,1]#"Y" THEN 5770
6060  REM ** CHECK FOR ADDITIONAL DATA WITH SAME NAME **
6070  IF U$[1,1]="Y" THEN 6090
6080  GOTO 5450
6090  READ #1,1
6100  ADVANCE #1;(C-1)*7,R
6110  UPDATE #1;'25'25'25
6120  PRINT LIN(2)"Delete marked!"'7
6130  GOTO 5430
6140  IF U$[1,1]="Y" THEN 6160
6150  GOTO 5670
6160  N$='25'25'25
6170  PRINT #1,J;N$,I$,R$,T$,K$,G$,H$
6180  PRINT LIN(3)"Deletion marked."
6185  ASSIGN *,1
6190  PRINT LIN(2)
6200  GOTO 5330
6201  PRINT "This function deletes names off the master file.  This is done"
6202  PRINT "by marking the first data feild in the entry. all the search and"
6203  PRINT "print-out routines will then pass over the marked item and it"
6204  PRINT "will be cleared out on the next sort. Target deletes can be "
6205  PRINT "searched by contact or company name. Follow the prompts carefully."
6206  PRINT LIN(3)
6207  GOTO 5450
6550  REM
6560  REM***ZIP SORT START HERE***
6565  PRINT "DO NOT INTERRPT A SORT IN PROGRESS!!!"
6570  PRINT LIN(3)"Caution!!! Do you want to sort?";
6575  H=1
6580  X$=""
6590  LINPUT X$
6600  IF X$[1,1]="Y" THEN 6620
6610  GOTO 530
6620  PRINT "Sort underway: Stand by..."
6625  Q9=BRK(0)
6630  ASSIGN Z1$,1,R
6640  ASSIGN Z0$,2,R
6645  Y0$="cat-"
6646  Y0$[LEN(Y0$)+1]=Z0$
6650  SYSTEM Q$,Y0$
6660  CONVERT Q$[12,15] TO N1
6670  PURGE R,"SCR01F"
6680  CREATE X,"SCR01F",N1+5
6685  IF X=0 THEN 6690
6686  PRINT "CREATION ERROR";X
6690  ASSIGN "SCR01F",3,R
6695  IF R=0 THEN 6700
6696  PRINT R
6700  A=B=C=A1=B1=C1=0
6710  IF  END #1 THEN 7860
6720  READ #1,1;A
6730  PRINT "The add file has";A;" names."
6740  IF  END #2 THEN 6790
6750  READ #2,1
6760  READ #2;N$,I$,R$,T$,K$,G$,H$
6770  B=B+1
6780  GOTO 6760
6790  PRINT "The master file has ";B;" names."
6800  IF N1 >= (B/5)+(A/5) THEN 6850
6810  PRINT Z0$;" is not long enough for the new add."
6820  PRINT "Use $FCOPY to lengthen ";(B/5)+(A/5);" records. "
6830  H1=BRK(1)
6840  GOTO 530
6850  PRINT LIN(2)"The merge has begun"
6860  READ #2,1
6870  READ #3,1
6880  J=2
6890  IF  END #1 THEN 7180
6900  IF  END #2 THEN 7270
6910  READ #1,J;N1$,I1$,R1$,T1$,K1$,G1$,H1$
6920  IF N1$[1,3]#'25'25'25 THEN 6970
6930  PRINT "Add item ";I1$;" deleted."
6940  A1=A1+1
6950  J=J+1
6960  GOTO 6910
6970  READ #2;N$,I$,R$,T$,K$,G$,H$
6980  IF  END #1 THEN 7230
6990  IF N$[1,3]#'25'25'25 THEN 7030
7000  PRINT "Master item ";I$;" Deleted!"
7010  A1=A1+1
7020  GOTO 6970
7030  IF K$>K1$ THEN 7070
7040  PRINT #3;N$,I$,R$,T$,K$,G$,H$, END 
7050  C1=C1+1
7060  GOTO 6970
7070  PRINT #3;N1$,I1$,R1$,T1$,K1$,G1$,H1$, END 
7080  C1=C1+1
7090  PRINT "Add file item # ";J-1;" merged at ZIP code ";K1$
7100  J=J+1
7110  READ #1,J;N1$,I1$,R1$,T1$,K1$,G1$,H1$
7120  IF N1$[1,3]#'25'25'25 THEN 7170
7130  PRINT "Add item ";I1$;" deleted."
7140  A1=A1+1
7150  J=J+1
7160  GOTO 7110
7170  GOTO 7030
7180  READ #2;N$,I$,R$,T$,K$,G$,H$
7190  IF N$[1,3]#'25'25'25 THEN 7230
7200  PRINT "Master item ";I$;" Deleted!"
7210  A1=A1+1
7220  GOTO 7180
7230  IF  END #2 THEN 7390
7240  PRINT #3;N$,I$,R$,T$,K$,G$,H$, END 
7250  C1=C1+1
7260  GOTO 7180
7270  IF  END #1 THEN 7390
7280  PRINT #3;N1$,I1$,R1$,T1$,K1$,G1$,H1$, END 
7290  PRINT "Add file item # ";J-1;"merged at ZIP code ";K1$
7300  C1=C1+1
7310  J=J+1
7320  READ #1,J;N1$,I1$,R1$,T1$,K1$,G1$,H1$
7330  IF N1$[1,3]#'25'25'25 THEN 7380
7340  PRINT "Add item ";I1$;" deleted."
7350  A1=A1+1
7360  J=J+1
7370  GOTO 7320
7380  GOTO 7280
7390  PRINT LIN(2)"End of merge"
7400  IMAGE"Original Master = ",4D
7410  IMAGE"   Original Add = ",4D
7420  IMAGE"  Minus Deletes = ",4D
7430  IMAGE"  Projected New = ",4D
7440  PRINT LIN(2)
7450  PRINT  USING 7400;B
7460  PRINT  USING 7410;A
7470  PRINT  USING 7420;A1
7480  PRINT "===================="
7490  PRINT  USING 7430;B+A-A1
7500  PRINT LIN(2)"The sorted file = ";C1
7510  IF A+B-A1#C1 THEN 7530
7520  GOTO 7560
7530  PRINT LIN(3)"The old master ";B;" and the old Add ";A;" minus the deletes ";A1
7540  PRINT "do not = the new sorted total. Sort aborted with";Z0$;"and";Z1$;
7545  PRINT "and SCR01F left intact. "'7
7550  STOP 
7560  PRINT LIN(3)"Sorted file checks...Move to master.(";Z0$;")"
7570  IF  END #2 THEN 7820
7580  IF  END #3 THEN 7660
7590  Q=0
7600  READ #2,1
7610  READ #3,1
7620  READ #3;N$,I$,R$,T$,K$,G$,H$
7630  PRINT #2;N$,I$,R$,T$,K$,G$,H$, END 
7640  Q=Q+1
7650  GOTO 7620
7660  IF Q#C1 THEN 7820
7670  PRINT "Move completed....Sort completed!!!!!"
7680  PRINT "Clearing Add File.."
7690  J=0
7700  IF  END #1 THEN 7750
7710  J=J+1
7720  READ #1,J
7730  PRINT #1,J
7740  GOTO 7710
7750  PRINT "Add clearing complete!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
7760  ASSIGN *,1,R
7770  ASSIGN *,2,R
7780  ASSIGN *,3,R
7790  PURGE R,"SCR01F"
7800  H1=BRK(1)
7810  GOTO 7850
7820  PRINT "Fatal error---Reload old master and add from tape!!!"
7830  PRINT C1;" moved to ";Q;" in";Z0$;"or";Z0$;"is to short!"'7
7840  STOP 
7850  GOTO 530
7860  PRINT LIN(3)"No Sort possible...Add file empty!"'7
7870  GOTO 530
7880  REM ** CONTACT SEARCH BEGINS HERE **
7890  PRINT LIN(2)
7900  PRINT "Search section: System file or Add file>"
7905  H=1
7910  PRINT "0=menu"
7920  PRINT "?=instructions"
7930  PRINT LIN(3)"Search system file ?";
7940  LINPUT P$
7950  P$=UOS$(P$)
7960  IF P$="0" THEN 530
7970  IF P$#"?" THEN 8010
7990  GOTO 8821
8000  GOTO 7930
8010  IF P$[1,1]="Y" THEN 8030
8020  GOTO 8480
8030  ASSIGN Z0$,1,R
8040  IF R=3 THEN 8060
8050  GOTO 8080
8060  PRINT LIN(2)"System file not found."
8070  GOTO 530
8080  PRINT "Do you want to locate by company or person ( C/P ) ";
8090  ENTER 255,X,P$
8100  P$=UOS$(P$)
8110  IF X=-256 THEN 8090
8120  IF P$="0" THEN 530
8130  IF P$="/E" THEN 7930
8140  PRINT 
8150  IF X=-256 THEN 8090
8160  READ #1,1
8170  IF P$[1,1]="C" THEN 8190
8180  GOTO 8210
8190  PRINT LIN(1)"Enter company ";
8200  GOTO 8220
8210  PRINT "Enter person's name ";
8220  LINPUT L$
8230  L$=UOS$(L$)
8240  IF L$="/E" THEN 8080
8250  PRINT LIN(4)
8260  IF  END #1 THEN 8440
8270  READ #1;N$,I$,R$,T$,K$,G$,H$
8280  IF N$[1,3]='25'25'25 THEN 8260
8290  IF P$="C" THEN 8330
8300  LET F=LEN(L$)
8310  IF N$[1,F]=L$[1,F] THEN 8360
8320  GOTO 8350
8330  LET F=LEN(L$)
8340  IF I$[1,F]=L$[1,F] THEN 8360
8350  GOTO 8260
8360  PRINT LIN(2);N$
8370  PRINT I$
8380  PRINT R$
8390  PRINT T$
8400  PRINT K$
8410  PRINT 
8420  PRINT "(";G$[1,3];") ";G$[4,6];"-";G$[7,10]
8425  PRINT H$
8430  GOTO 8260
8440  PRINT LIN(2)"No more names or not found."
8450  GOTO 7880
8460  IF L9=3 THEN 8580
8470  GOTO 530
8480  PRINT LIN(2)"You will search the 'add' file."
8490  ASSIGN Z1$,1,R
8500  IF R#3 THEN 8530
8510  PRINT Z1$;"1 not found!!!"
8520  GOTO 530
8530  PRINT LIN(2)"Do you want to search by company or person.(C/P)";
8540  LINPUT P$
8550  P$=UOS$(P$)
8560  IF P$="0" THEN 530
8570  IF P$[1,1]="C" THEN 8590
8580  GOTO 8610
8590  PRINT LIN(2)"Enter company name";
8600  GOTO 8620
8610  PRINT LIN(2)"Enter persons name ";
8620  LINPUT L$
8630  L$=UOS$(L$)
8640  IF L$="0" THEN 530
8650  IF L$="/E" THEN 8530
8660  IF  END #1 THEN 8440
8670  J=1
8680  J=J+1
8690  READ #1,J;N$,I$,R$,T$,K$,G$,H$
8700  IF N$[1,3]='25'25'25 THEN 8680
8710  F=LEN(L$)
8720  IF P$="C" THEN 8750
8730  IF N$[1,F]=L$[1,F] THEN 8770
8740  GOTO 8680
8750  IF I$[1,F]=L$[1,F] THEN 8770
8760  GOTO 8680
8770  PRINT LIN(2);N$
8780  PRINT I$
8790  PRINT R$
8800  PRINT K$
8810  PRINT LIN(1)"(";G$[1,3];") ";G$[4,6];"-";G$[7,10]
8815  PRINT H$
8820  GOTO 8680
8821  PRINT "The search function will find an entry in the master or the add"
8822  PRINT "files either by the contact name or by the company name.  It "
8823  PRINT "will also search by a partial input. eg: SAM will find all examples"
8824  PRINT "of SAM regardless of what follows."
8825  PRINT LIN(3)
8826  GOTO 7880
8830  REM *** COUNT STARTS HERE ***
8840  PRINT "Count section.."
8845  H=1
8850  PRINT "0=menu"
8860  PRINT "/E=backstep"
8870  PRINT "?=instructions"
8880  PRINT LIN(2)
8890  PRINT "File to be counted ";
8900  INPUT B$
8910  B$=UOS$(B$)
8920  IF B$="0" THEN 530
8930  IF B$#"?" THEN 8970
8950  GOTO 9331
8960  GOTO 8890
8970  ASSIGN B$,1,R
8980  IF R=3 THEN 8890
8990  A=0
9000  IF B$=Z1$ THEN 9200
9010  IF B$=Z1$ THEN 9200
9020  IMAGE"Entries = ",4DX
9030  IMAGE"Deletes = ",4dx
9040  IMAGE"         -------"
9050  IMAGE"Valid   = ",4dx
9060  IF  END #1 THEN 9130
9070  READ #1,1
9080  FOR I=1 TO 32767
9090  READ #1;N$,I$,R$,T$,K$,G$,H$
9100  IF N$[1,3]#'25'25'25 THEN 9120
9110  A=A+1
9120  NEXT I
9130  PRINT  USING 9020;I-1
9140  PRINT  USING 9030;A
9150  PRINT  USING 9040
9160  PRINT  USING 9050;(I-1)-A
9170  PRINT LIN(3)
9180  ASSIGN *,1,R
9190  GOTO 8830
9200  IF  END #1 THEN 9320
9210  READ #1,1;I
9220  I=I+1
9230  A=0
9240  IF  END #1 THEN 9310
9250  J=1
9260  J=J+1
9270  READ #1,J;N$
9280  IF N$[1,3]#'25'25'25 THEN 9260
9290  A=A+1
9300  GOTO 9260
9310  GOTO 9130
9320  I=1
9330  GOTO 9130
9331  PRINT "This function will count the entrys in the master or the add files."
9332  PRINT "The master file is named";Z0$;" & the add file is named";Z1$
9333  PRINT "The count will show all entrys on file and how many have been "
9334  PRINT "marked for deletion on the next sort."
9335  PRINT LIN(3)
9336  GOTO 8830
9340  REM ** MISC AND SUNDRY MSSGS **
9350  PRINT LIN(2)
9360  PRINT "********** ERROR ***********"'7
9370  RETURN 
9380  SYSTEM X,"BYE"
9390  END 
