1 DIM CO$(30),S01$(30),S02$(18),S03$(24),S04$(35),S05$(15),S06$(2),S07$(10),S08$(12),S09$(8),Z(20)
2 DEF FNAT$(I,J)=CHR$(27)+CHR$(61)+CHR$(I+32)+CHR$(J+32)
3 DEFINT A-Z
4 BEL=-1:BELL$="= ON = "
5 ERS$=CHR$(8)+" "+CHR$(8):BSL$=CHR$(8)+"/"+CHR$(8)
6 ON ERROR GOTO 120
7 GOSUB 111
8 GOSUB 115
9 GOSUB 108
10 DE=0:SK=0:ED=0:PR=0:SE=0:PRINT FNAT$(5,31);"M A I N   M E N U"
11 PRINT FNAT$(6,31);"================="
12 PRINT FNAT$(8,21);"Current data file --> ";FIL$
13 PRINT FNAT$(10,21);"<A> Add new member to database.":GOSUB 14:GOTO 15
14 PRINT FNAT$(11,21);"<B> The program BELL is  "+BELL$:RETURN
15 PRINT FNAT$(12,21);"<C> Change existing member data."
16 PRINT FNAT$(13,21);"<D> Delete a current member."
17 PRINT FNAT$(14,21);"<F> Change current data drive/filename."
18 PRINT FNAT$(15,21);"<L> List current database members."
19 PRINT FNAT$(16,21);"<M> MAIL - Generate labels (ALL members)."
20 PRINT FNAT$(17,21);"<S> Scan database (print single labels)."
21 PRINT FNAT$(18,21);"<T> Telephone number roladex."
22 PRINT FNAT$(19,21);"<Q> Quit - Exit & return to CP/M."
23 PR=0:LP=0:CO=0:PRINT FNAT$(21,29);"Enter your choice [";:XX=1:XXX=2:GOSUB 49
24 CHAR$=INPUT$(1)
25 IF CHAR$="A" OR CHAR$="a" THEN 374
26 IF CHAR$="B" OR CHAR$="b" THEN BEL=NOT BEL:GOSUB 378:GOSUB 14:GOTO 23
27 IF CHAR$="C" OR CHAR$="c" THEN 208
28 IF CHAR$="D" OR CHAR$="d" THEN 230
29 IF CHAR$="F" OR CHAR$="f" THEN 251
30 IF CHAR$="L" OR CHAR$="l" THEN 255
31 IF CHAR$="M" OR CHAR$="m" THEN 339
32 IF CHAR$="S" OR CHAR$="s" THEN 266
33 IF CHAR$="T" OR CHAR$="t" THEN 280
34 IF CHAR$="Q" OR CHAR$="q" THEN 107 ELSE CHAR=0:GOSUB 51:GOTO 23
35 PRINT FNAT$(5,22);"                                  ":PRINT FNAT$(6,4);"                                                 ":PRINT FNAT$(8,4);"                                     "    
36 PRINT FNAT$(7,4);"                                                  ":PRINT FNAT$(8,4);"                                                               ":PRINT FNAT$(9,4);"                                                                          "
37 PRINT FNAT$(9,4);"                                                       ":PRINT FNAT$(10,4);"                                                           "
38 PRINT FNAT$(11,4);"                                                         "
39 PRINT FNAT$(12,4);"                                                                      "
40 PRINT FNAT$(13,4);"                                                          "
41 PRINT FNAT$(14,4);"                                                           "
42 PRINT FNAT$(15,2);"                                                                       "
43 PRINT FNAT$(16,4);"                                                          "
44 PRINT FNAT$(17,4);"                                                               "
45 PRINT FNAT$(18,4);"                                                 "
46 PRINT FNAT$(19,4);"                                                  ":PRINT FNAT$(20,4);"                                                     "
47 PRINT FNAT$(21,4);"                                              "
48 RETURN
49 FOR I=1 TO XX:PRINT CHR$(95);:NEXT I:PRINT "]";
50 FOR Z=1 TO 350:NEXT Z
51 IF BEL=-1 THEN 52 ELSE IF BEL=0 THEN 53
52 FOR I=1 TO XXX:PRINT CHR$(8)+CHR$(7);:NEXT I:RETURN
53 FOR I=1 TO XXX:PRINT CHR$(8);:NEXT I:RETURN
54 RETURN
55 REM
56 REM ***PRINT STRING FROM A$ ON CONSOLE***
57 REM
58 IF SAV$<>"" AND A1$<>"" THEN A1$="":RETURN
59 IF A1$<>"" THEN A$=A1$:A1$=""
60 IF N=1 THEN PRINT FNAT$(E,F);A$;:PP$=A$:GOTO 65
61 BI=ASC(INKEY$+" ")
62 IF BI=&H13 OR BI=&H53 OR BI=&H73 THEN BI=ASC(INPUT$(1)):GOTO 64
63 IF BI=&HB OR BI=&H4B OR BI=&H6B THEN BK=-1:PRINT:PRINT "<Aborted>":GOTO 67
64 PRINT FNAT$(E,F);A$;
65 A=A+LEN(A$)
66 A$="":N=0
67 RETURN
68 REM
69 REM ***ACCEPT STRING INTO B$ FROM CONSOLE***
70 IF BEL AND SAV$="" THEN PRINT CHR$(7);
71 B$="":BK=0
72 IF SAV$="" THEN GOSUB 80:IF C<>3 THEN PRINT
73 SP=INSTR(SAV$,";"):IF SP=0 THEN B$=SAV$:SAV$="":GOTO 75
74 B$=LEFT$(SAV$,SP-1):SAV$=MID$(SAV$,SP+1)
75 IF LEN(B$)=0 THEN C=0:RETURN
76 IF C=0 THEN 78
77 CY$=B$:GOSUB 99:B$=CY$
78 D=D+LEN(B$):C=0
79 RETURN
80 REM
81 REM CHARACTER-AT-A-TIME LINE INPUT WITH EDITING (IF C=2, NO ECHO)
82 REM
83 CHC=0: SAV$="":DC=0:IC=&H30
84 NCH=ASC(INPUT$(1))
85 IF NCH=13 THEN RETURN 'CR
86 IF NCH=127 THEN 94
87 IF NCH<32 THEN 96
88 IF CHC>=63 THEN PRINT CHR$(7);:GOTO 84
89 SAV$=SAV$+CHR$(NCH): CHC=CHC+1 :IC=IC+1:IF IC=&H3A THEN IC=&H30
90 IF DC THEN PRINT CHR$(10);
91 IF C<>2 THEN PRINT CHR$(NCH); ELSE PRINT CHR$(IC);
92 IF CHC=55 THEN PRINT CHR$(7);
93 DC=0:GOTO 84
94 IF CHC=0 THEN 84 ELSE PRINT BSL$;:DC=-1
95 CHC=CHC-1:IC=IC-1: SAV$=LEFT$(SAV$,CHC): GOTO 84
96 IF CHC=0 THEN 84
97 IF NCH=8 THEN PRINT ERS$;:DC=0:GOTO 95 'BS
98 DC=0:GOTO 84
99 REM
100 REM UPPERCASE STRING CY$ (e.g., frank -> FRANK)
101 REM
102 FOR ZZ=1 TO LEN(CY$)
103 ZA=ASC(MID$(CY$,ZZ,1)):IF ZA<&H61 OR ZA>&H7A THEN 105
104 MID$(CY$,ZZ,1)=CHR$(ZA-&H20)
105 NEXT ZZ
106 RETURN
107 GOSUB 338:SYSTEM
108 A$="Enter today's date (DD/MM/YY) [":N=1:E=9:F=18:GOSUB 55:XX=8:XXX=9:GOSUB 49
109 C=1:GOSUB 68:DAT$=B$:IF LEN(B$)<8 OR LEN(B$)>8 THEN 108 ELSE IF B$="" THEN 108
110 GOSUB 35:RETURN
111 PRINT CHR$(26)
112 PRINT FNAT$(0,15);"M A I L I N G   L I S T   D A T A B A S E   v 2.5"
113 PRINT FNAT$(2,21);"Copyright (c) June 1986 by Eric Shore"
114 RETURN
115 PRINT FNAT$(6,25);"Reading file A:CONTROL.DAT"
116 OPEN "I",1,"CONTROL.DAT"
117 INPUT #1,FIL$
118 CLOSE #1
119 RETURN
120 IF ERL=116 THEN RESUME 122
121 RESUME NEXT
122 CLOSE#1:PRINT FNAT$(8,18);"Enter the drive and filename of the datafile"
123 PRINT FNAT$(9,26);"or <RETURN>=b:datafile.dat":A$="[":N=1:E=11:F=30:GOSUB 55:XX=14:XXX=15:GOSUB 49
124 C=1:GOSUB 68:FIL$=B$:IF B$="" THEN 125 ELSE IF LEN(B$)<14 OR LEN(B$)>14 THEN 123 ELSE 126
125 FIL$="B:DATAFILE.DAT":GOSUB 35
126 OPEN "O",1,"CONTROL.DAT":WRITE #1,FIL$:CLOSE#1:GOSUB 35:RETURN
127 GOSUB 35:PRINT FNAT$(7,5);"Entering N/A means you don't want a company name.":A$="Enter Company (c/r to quit) [":N=1:E=9:F=5:GOSUB 55:XX=26:XXX=27:GOSUB 49
128 C=1:GOSUB 68:CO$=B$:IF B$="N/A" THEN QQ=1 ELSE IF LEN(B$)>26 THEN 127 ELSE IF B$="" THEN GOSUB 35:GOTO 10 ELSE OK=0
129 IF ST=1 THEN RETURN ELSE IF ED=1 AND CO$="N/A" THEN 131 ELSE IF ED=1 THEN 375 ELSE IF SK=1 AND CO$="N/A" THEN 131 ELSE IF SK=1 THEN 209 ELSE IF DE=1 AND CO$="N/A" THEN 131 ELSE IF DE=1 THEN 231
130 IF SE=1 AND CO$="N/A" THEN 131 ELSE IF SE=1 THEN 267 ELSE GOSUB 173:IF CO$=S01$ THEN GOSUB 328
131 A$="Enter first name .......... [":N=1:E=10:F=5:GOSUB 55:XX=10:XXX=11:GOSUB 49
132 C=1:GOSUB 68:FI$=B$:IF LEN(B$)>10 THEN 131 ELSE IF B$="" THEN 131 ELSE IF ST=1 THEN RETURN ELSE IF SK=1 AND CO$="N/A" THEN 133 ELSE IF SK=1 THEN 209 ELSE IF DE=1 AND CO$="N/A" THEN 133 ELSE IF ED=1 THEN 133 ELSE IF SE=1 AND CO$="N/A" THEN 133
133 A$="Last name ................. [":N=1:E=11:F=5:GOSUB 55:XX=14:XXX=15:GOSUB 49
134 C=1:GOSUB 68:LA$=B$:IF LEN(B$)>14 THEN 133 ELSE IF B$="" THEN 133 ELSE IF ST=1 THEN RETURN ELSE IF ED=1 THEN RETURN ELSE IF SK=1 THEN 209 ELSE IF DE=1 THEN 231 ELSE IF SE=1 AND CO$="N/A" THEN 267
135 A$="Street address ............ [":N=1:E=12:F=5:GOSUB 55:XX=24:XXX=25:GOSUB 49
136 C=1:GOSUB 68:S04$=B$:IF LEN(B$)>24 THEN 135 ELSE IF B$="" THEN 135 ELSE IF ST=1 THEN RETURN
137 A$="City ...................... [":N=1:E=13:F=5:GOSUB 55:XX=14:XXX=15:GOSUB 49
138 C=1:GOSUB 68:S05$=B$:IF LEN(B$)>14 THEN 137 ELSE IF B$="" THEN 137 ELSE IF ST=1 THEN RETURN
139 A$="State ..................... [":N=1:E=14:F=5:GOSUB 55:XX=2:XXX=3:GOSUB 49
140 C=1:GOSUB 68:S06$=B$:IF LEN(B$)>2 THEN 139 ELSE IF B$="" THEN 139 ELSE IF ST=1 THEN RETURN
141 A$="Zip ....................... [":N=1:E=15:F=5:GOSUB 55:XX=10:XXX=11:GOSUB 49
142 C=1:GOSUB 68:S07$=B$:IF LEN(B$)>10 THEN 141 ELSE IF B$="" THEN 141 ELSE IF ST=1 THEN RETURN
143 A$="Business phone ............ [":N=1:E=16:F=5:GOSUB 55:XX=12:XXX=13:GOSUB 49
144 C=1:GOSUB 68:S08$=B$:IF LEN(B$)>12 THEN 143 ELSE IF B$="" THEN 143 ELSE IF ST=1 THEN RETURN
145 A$=" (Y)es = Add the info   (N)o = Re-enter info [":N=1:E=20:F=5:GOSUB 55:XX=1:XXX=2:GOSUB 49
146 C=1:GOSUB 68:A$=B$:IF B$="" THEN 145
147 IF B$="Y" OR B$="y" THEN GOSUB 164:GOTO 374
148 IF B$="N" OR B$="n" THEN GOTO 374 ELSE 145
149 REM
150 REM FILL AND STORE DISK RECORD
151 REM
152 LSET RR$=LEFT$(S$+SPACE$(RL-2),RL-2)+CHR$(13)+CHR$(10)
153 RETURN
154 REM
155 REM UNPACK DISK RECORD
156 REM
157 ZZ=LEN(RR$)-2
158 WHILE MID$(RR$,ZZ,1)=" "
159 ZZ=ZZ-1:IF ZZ=1 THEN 161
160 WEND
161 S$=LEFT$(RR$,ZZ)
162 IF MID$(S$,ZZ,1)="?" THEN S$=S$+" "
163 RETURN
164 REM
165 OPEN "R",1,FIL$,128:FIELD#1,128 AS RR$
166 S09$=DAT$:S01$=CO$:S02$=FI$:S03$=LA$:S$=S01$+";"+S02$+";"+S03$+";"+S04$+";"+S05$+";"+S06$+";"+S07$+";"+S08$+";"+S09$
167 RL=128:GOSUB 168:NU=NU+1:PUT#1,NU+1:S$=STR$(NU):GOSUB 168:PUT#1,1:CLOSE:CO$="":RETURN
168 REM
169 REM FILL AND STORE DISK RECORD
170 REM
171 LSET RR$=LEFT$(S$+SPACE$(RL-2),RL-2)+CHR$(13)+CHR$(10)
172 RETURN
173 REM
174 REM CHECK USERS FILE
175 REM
176 OPEN "R",1,FIL$,128:FIELD#1,128 AS RR$:GET#1,1:NU=VAL(RR$)
177 FOR J=2 TO NU+1:GET#1,J:GOSUB 154:S00$=MID$(S$,1)
178 I=INSTR(S00$,";"): S01$=LEFT$(S00$,I-1):S02$=MID$(S00$,I+1)
179 I=INSTR(S02$,";"): S03$=MID$(S02$,I+1):S02$=LEFT$(S02$,I-1)
180 I=INSTR(S03$,";"): S04$=MID$(S03$,I+1):S03$=LEFT$(S03$,I-1)
181 I=INSTR(S04$,";"): IF I=0 THEN S05$="0":GOTO 187
182 S05$=MID$(S04$,I+1):S04$=LEFT$(S04$,I-1)
183 I=INSTR(S05$,";"):S06$=MID$(S05$,I+1):S05$=LEFT$(S05$,I-1)
184 I=INSTR(S06$,";"):S07$=MID$(S06$,I+1):S06$=LEFT$(S06$,I-1)
185 I=INSTR(S07$,";"):S08$=MID$(S07$,I+1):S07$=LEFT$(S07$,I-1)
186 I=INSTR(S08$,";"):S09$=MID$(S08$,I+1):S08$=LEFT$(S08$,I-1)
187 REM
188 IF LAST$="" THEN 189 ELSE IF LAST$=LEFT$(S03$,1) THEN GOSUB 289:GOTO 189 ELSE 189
189 IF LEFT$(S$,1)="*" THEN 199
190 IF QQ=0 AND CO$<>S01$ THEN 194
191 IF QQ=1 AND FI$<>S02$ THEN 194
192 IF QQ=1 AND LA$<>S03$ THEN 194
193 UJ=J:OK=-1:CLOSE:RETURN
194 IF CO=1 THEN GOSUB 307:GOTO 199
195 IF CO=2 THEN GOSUB 309:GOTO 199
196 IF CO=3 THEN GOSUB 310:GOTO 199
197 IF CO=4 THEN GOSUB 355:GOTO 199
198 IF CO=5 THEN GOSUB 363:GOTO 199
199 LP=LP+1:NEXT J
200 CLOSE:RETURN
201 REM
202 REM UPDATE USERS FILE
203 REM
204 REM
205 OPEN "R",1,FIL$,128:FIELD#1,128 AS RR$
206 S02$=FI$:S03$=LA$:S09$=DAT$:S01$=CO$:S$=S01$+";"+S02$+";"+S03$+";"+S04$+";"+S05$+";"+S06$+";"+S07$+";"+S08$+";"+S09$
207 RL=128:GOSUB 149:PUT#1,UJ:CLOSE:RETURN
208 SK=1:GOTO 127
209 OK=0:GOSUB 173:IF CO$<>"N/A" THEN 210 ELSE IF CO$="N/A" AND CO$=S01$ AND FI$=S02$ AND LA$=S03$ THEN 211 ELSE GOSUB 234:GOTO 208
210 IF CO$=S01$ THEN 211 ELSE GOSUB 234:GOTO 208
211 FI$=S02$:LA$=S03$
212 SK=0:ST=0
213 GOSUB 35:GOSUB 235
214 PRINT FNAT$(17,4)"Enter field (1-8) to change, <S>ave (or c/r = quit) ";:GOSUB 378
215 CHAR$=INPUT$(1)
216 IF CHAR$=CHR$(13) THEN CHAR=0:GOSUB 35:FI$="":LA$="":GOTO 10 ELSE IF CHAR$="S" OR CHAR$="s" THEN GOSUB 35:GOSUB 228:PRINT FNAT$(18,30);"[ Editing Record ]";:GOSUB 381:GOSUB 205:GOSUB 35:FI$="":LA$="":GOTO 10 ELSE 217
217 IF CHAR$="1" THEN ST=1:GOSUB 127:GOTO 212
218 IF CHAR$="2" THEN ST=1:GOSUB 35:GOSUB 131:GOTO 212
219 IF CHAR$="3" THEN ST=1:GOSUB 35:GOSUB 133:GOTO 212
220 IF CHAR$="4" THEN ST=1:GOSUB 35:GOSUB 135:GOTO 212
221 IF CHAR$="5" THEN ST=1:GOSUB 35:GOSUB 137:GOTO 212
222 IF CHAR$="6" THEN ST=1:GOSUB 35:GOSUB 139:GOTO 212
223 IF CHAR$="7" THEN ST=1:GOSUB 35:GOSUB 141:GOTO 212
224 IF CHAR$="8" THEN ST=1:GOSUB 35:GOSUB 143:GOTO 212 ELSE 214
225 END
226 S$=S01$+";"+S02$+";"+S03$+";"+S04$+";"+S05$+";"+S06$+";"+S07$+";"+S08$+";"+S09$
227 PRINT S$:END
228 S02$=FI$:S03$=LA$:S01$=CO$:S02$=FI$:S03$=LA$:S$=S01$+";"+S02$+";"+S03$+";"+S04$+";"+S05$+";"+S06$+";"+S07$+";"+S08$+";"+S09$
229 RETURN
230 DE=1:GOTO 127
231 OK=0:GOSUB 173:QQ=0:IF CO$<>"N/A" THEN 232 ELSE IF CO$="N/A" AND CO$=S01$ AND FI$=S02$ AND LA$=S03$ THEN 233 ELSE GOSUB 234:GOTO 230
232 IF CO$=S01$ THEN 233 ELSE GOSUB 234:GOTO 230
233 SK=0:ED=0:DE=0:FI$=S02$:LA$=S03$:GOSUB 35:GOSUB 235:GOSUB 244
234 A$="[Requested member not found in the database]":E=13:F=17:GOSUB 55:GOSUB 381:FOR Z=1 TO 32000:NEXT:FOR N=1 TO 32000:NEXT:FOR L=1 TO 32000:NEXT:RETURN
235 PRINT FNAT$(7,4);"1. Company name:";FNAT$(7,23);CO$
236 PRINT FNAT$(8,4);"2. First name:";FNAT$(8,23);FI$
237 PRINT FNAT$(9,4);"3. Last name:";FNAT$(9,23);LA$
238 PRINT FNAT$(10,4);"4. Address:";FNAT$(10,23);S04$
239 PRINT FNAT$(11,4);"5. City:";FNAT$(11,23);S05$
240 PRINT FNAT$(12,4);"6. State:";FNAT$(12,23);S06$
241 PRINT FNAT$(13,4);"7. Zip:";FNAT$(13,23);S07$
242 PRINT FNAT$(14,4);"8. Business phone:";FNAT$(14,23);S08$
243 RETURN
244 PRINT FNAT$(17,4);"<Y>es = delete   <N>o = search for another match ";:GOSUB 381
245 CHAR$=INPUT$(1)
246 IF CHAR$="N" OR CHAR$="n" THEN GOTO 230
247 IF CHAR$="Y" OR CHAR$="y" THEN GOSUB 35:GOTO 248 ELSE 244
248 PRINT FNAT$(18,30);"[ Deleting Record ]";:GOSUB 381
249 S$="************ RECORD DELETED *************"
250 OPEN "R",1,FIL$,128:FIELD#1,128 AS RR$:GOSUB 360:GOSUB 35:GOTO 10
251 GOSUB 35:PRINT FNAT$(9,12);"Enter new data drive and filename (ie: b:mydata.dat)"
252 PRINT FNAT$(10,12);"or a <RETURN> leaves data drive/file unchanged."
253 A$="[":N=1:E=12:F=29:GOSUB 55:XX=14:XXX=15:GOSUB 49
254 C=1:GOSUB 68:FI$=B$:IF LEN(B$)>14 THEN 253 ELSE IF B$="" THEN GOSUB 35:FIL$=FIL$:GOTO 10 ELSE FIL$=FI$:PRINT FNAT$(14,14);"New data drive and filename is --> ";FIL$;:GOSUB 381::FOR Z=1 TO 2000:NEXT Z:GOSUB 35:GOTO 10
255 CO$="":GOSUB 35:PRINT FNAT$(6,4);"LIST DATABASE MEMBERS"
256 PRINT FNAT$(8,4);"For an alphabetically sorted listing, run the"
257 PRINT FNAT$(9,4);"SORT.COM utility on your data file first."
258 PRINT FNAT$(12,4);"1. List by company name only."
259 PRINT FNAT$(13,4);"2. List by company, name and address."
260 PRINT FNAT$(14,4);"3. List entire database record of each member."
261 A$="Enter your choice (c/r=quit) [":N=1:E=16:F=8:GOSUB 55:XX=1:XXX=2:GOSUB 49
262 C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 261 ELSE IF B$="" THEN GOSUB 35:GOTO 10
263 IF B$="1" THEN CO=1:PRINT CHR$(26):GOSUB 311:GOSUB 173:GOSUB 291:CO=0:PR=0:GOSUB 111:GOTO 10
264 IF B$="2" THEN CO=2:PRINT CHR$(26):GOSUB 311:GOSUB 173:GOSUB 291:CO=0:PR=0:GOSUB 111:GOTO 10
265 IF B$="3" THEN CO=3:PRINT CHR$(26):GOSUB 311:GOSUB 173:GOSUB 291:CO=0:PR=0:GOSUB 111:GOTO 10
266 SE=1:GOTO 127
267 OK=0:GOSUB 173:IF CO$<>"N/A" THEN 268 ELSE IF CO$="N/A" AND CO$=S01$ AND FI$=S02$ AND LA$=S03$ THEN 269 ELSE GOSUB 234:GOTO 266
268 IF CO$=S01$ THEN 269 ELSE GOSUB 234:GOTO 266
269 GOSUB 35
270 PRINT FNAT$(7,4);"Company:";FNAT$(7,26);S01$
271 PRINT FNAT$(8,4);"Name:";FNAT$(8,26);S02$+" "+S03$
272 PRINT FNAT$(9,4);"Address:";FNAT$(9,26);S04$
273 PRINT FNAT$(10,4);"City, St., Zip:";FNAT$(10,26);S05$+", "+S06$+"   "+S07$
274 PRINT FNAT$(11,4);"Business phone:";FNAT$(11,26);S08$
275 PRINT FNAT$(12,4);"Date entered:";FNAT$(12,26);S09$
276 A$="<C>on't search, <G>enerate label, <P>rint info, or <RETURN> to MENU [":N=1:E=15:F=2:GOSUB 55:XX=1:XXX=2:GOSUB 49
277 C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 276 ELSE IF B$="" THEN GOSUB 35:CO$="":PR=0:CO=0:GOTO 10
278 IF B$="P" OR B$="p" THEN GOSUB 322:GOSUB 329:GOSUB 43:GOTO 276 ELSE IF B$="G" OR B$="g" THEN GOSUB 322:GOSUB 335:GOSUB 43:GOTO 276
279 IF B$="C" OR B$="c" THEN 266:RETURN
280 GOSUB 35:PRINT FNAT$(6,4);"TELEPHONE NUMBER ROLADEX"
281 PRINT FNAT$(9,4);"This option will list names, companies, and phone numbers for"
282 PRINT FNAT$(10,4);"any given beginning letter (A-Z) of the last name."
283 A$="Enter lastname letter to scan..... [":N=1:E=14:F=17:GOSUB 55:XX=1:XXX=2:GOSUB 49
284 C=1:GOSUB 68:LAST$=B$:IF LEN(B$)>1 THEN 283 ELSE IF B$="" THEN 283
285 OK=0
286 GOSUB 363:PRINT CHR$(26):N=0:IF PR=1 THEN GOSUB 173:GOTO 287 ELSE PRINT "MAILING LIST ROLADEX":PRINT "--------------------":PRINT:GOSUB 173
287 GOSUB 291
288 SMID$="":CMID$="":LAST$="":GOSUB 111:GOTO 10
289 CO$="TEST":SMID$=STRING$(34-LEN(S02$+" "+S03$),32):CMID$=STRING$(35-LEN(S01$),32)
290 IF PR=1 THEN GOSUB 367:RETURN ELSE PRINT "   Name: ";S02$;" ";S03$;SMID$;"Phone: ";S08$:PRINT "Company: ";S01$;CMID$;"City: ";S05$:PRINT:N=N+1:IF N=6 THEN GOSUB 294:PRINT:PRINT:RETURN ELSE RETURN
291 PRINT
292 IF PR=1 AND CO=4 THEN PRINT CHR$(26):RETURN ELSE IF PR=1 AND CO<>4 THEN PRINT CHR$(26):LPRINT CHR$(140):RETURN ELSE PRINT "[End of File - <RETURN> to MENU]";:GOSUB 381:CHAR$=INPUT$(1)
293 IF CHAR$=CHR$(13) THEN PRINT CHR$(26):RETURN ELSE FOR I=1 TO 33:PRINT CHR$(8);:NEXT I:GOTO 292
294 GOSUB 296
295 IF BK<>-1 THEN RETURN ELSE IF BK=-1 THEN GOTO 288
296 REM    PAUSE 
297 ZZZ=ZZZ+1
298 IF ZZZ<NN THEN RETURN
299 PRINT
300 N=0:PRINT "Hit <RETURN> for more or <Q>uit ";:GOSUB 381
301 XX$=INPUT$(1):IF XX$=CHR$(13) THEN BK$="1":GOTO 302 ELSE IF XX$="Q" OR XX$="q" THEN CLOSE:SMID$="":CMID$="":CO$="":PR=0:CO=0:SK=0:ED=0:BK=-1:BK$="0" ELSE 306
302 FOR I=1 TO 32:PRINT CHR$(8);:NEXT I
303 PRINT "                                 "
304 ZZZ=0
305 RETURN
306 FOR I=1 TO 32:PRINT CHR$(8);:NEXT I:GOTO 300
307 IF PR=1 THEN GOTO 317 ELSE IF S01$="N/A" THEN PRINT S01$;" - ";S02$;" ";S03$ ELSE IF S01$<>"N/A" THEN PRINT S01$:N=N+1:IF N=18 THEN GOSUB 294:RETURN ELSE RETURN
308 RETURN
309 IF PR=1 THEN 320 ELSE PRINT S01$:PRINT S02$+" "+S03$:PRINT S04$:PRINT S05$+", "+S06$+"    "+S07$:PRINT:N=N+1:IF N=4 THEN GOSUB 294:RETURN ELSE RETURN
310 IF PR=1 THEN 319 ELSE PRINT S01$:PRINT S02$+" "+S03$:PRINT S04$:PRINT S05$+", "+S06$+"    "+S07$:PRINT "Business phone: "+S08$:PRINT "Date entered:   "+S09$:PRINT:N=N+1:IF N=3 THEN GOSUB 294:RETURN ELSE RETURN
311 PRINT CHR$(26)
312 A$="[List to PRINTER instead of CRT (Y/N)] [":N=1:E=16:F=15:GOSUB 55:XX=1:XXX=2:GOSUB 49
313 C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 312 ELSE IF B$="" THEN 312
314 IF B$="Y" OR B$="y" THEN PR=1:GOSUB 322:LPRINT:LPRINT "LISTING MEMBERS as of  ";DAT$:LPRINT
315 IF B$="N" OR B$="n" THEN PRINT CHR$(26):RETURN
316 RETURN
317 IF LP=56 THEN GOTO 361 ELSE IF S01$="N/A" THEN 318 ELSE LPRINT S01$:N=N+1:RETURN
318 LPRINT S01$;" - ";S02$;" ";S03$:N=N+1:RETURN
319 IF LP=8 THEN GOTO 327 ELSE LPRINT S01$:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"    "+S07$:LPRINT "Business phone:  "+S08$:LPRINT "Date entered:    "+S09$:LPRINT:N=N+1:RETURN
320 IF LP=11 THEN GOTO 362 ELSE LPRINT S01$:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"    "+S07$:LPRINT:N=N+1:RETURN
321 RETURN
322 A$="[Print <R>egular or <C>ondensed print] [":N=1:E=17:F=15:GOSUB 55:XX=1:XXX=2:GOSUB 49
323 C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 322 ELSE IF B$="" THEN 322
324 IF B$="R" OR B$="r" THEN LPRINT CHR$(146);:GOSUB 326:RETURN
325 IF B$="C" OR B$="c" THEN GOSUB 326:LPRINT CHR$(143);:RETURN
326 PRINT FNAT$(19,25);"[Printing in progress]";:GOSUB 381:RETURN
327 CO=CO:LPRINT CHR$(140):LP=0:LPRINT S01$:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"  "+S07$:LPRINT "Business phone:  "+S08$:LPRINT "Date entered:   "+S09$:LPRINT:LP=0:N=N+1:RETURN
328 IF B$="N/A" THEN N=N+1:RETURN ELSE A$="[Member already EXISTS - Use <C> to change]":E=13:F=15:GOSUB 55:GOSUB 381:FOR Z=1 TO 32000:NEXT:FOR N=1 TO 32000:NEXT:FOR L=1 TO 32000:NEXT L:GOSUB 35:GOTO 10
329 LPRINT:LPRINT "Company:            ";S01$
330 LPRINT "Name:               ";S02$+" "+S03$
331 LPRINT "Address:            ";S04$
332 LPRINT "City, St., Zip:     ";S05$+", "+S06$+"    "+S07$
333 LPRINT "Business phone:     ";S08$
334 LPRINT "Date entered:       ";S09$:LPRINT:RETURN
335 GOSUB 336:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"    "+S07$:RETURN
336 IF S01$="N/A" THEN LPRINT:RETURN ELSE LPRINT S01$:RETURN
337 LPRINT "
338 PRINT CHR$(26):PRINT FNAT$(15,28);"Thankyou, see you again!";:GOSUB 381:RETURN
339 GOSUB 35:PRINT FNAT$(8,4);"GENERATE MAILING LABELS"
340 PRINT FNAT$(10,4);"Be sure that you have run SORT.COM first if an alphabitical"
341 PRINT FNAT$(11,4);"print-out is desired. This option prints ALL the members."
342 A$="[Press <RETURN> to print sample for alignment] ":N=1:E=14:F=14:GOSUB 55:C=1:GOSUB 68:A$=B$:IF B$="" THEN GOSUB 344:GOTO 346 ELSE 342
343 IF CHAR$=CHR$(13) THEN GOSUB 344 ELSE 342
344 GOSUB 322:LPRINT "ACME EQUIPMENT COMPANY":LPRINT "PAUL SMITH":LPRINT "854 WEST MAIN STREET":LPRINT "ANYWHERE, USA    33333"
345 LPRINT:LPRINT:RETURN
346 GOSUB 35:GOSUB 357:GOSUB 35
347 PRINT FNAT$(11,4)"<Y>es if aligned properly and ready to begin printing."
348 PRINT FNAT$(12,4)"<N>o if you desire another sample for alignment, or"
349 PRINT FNAT$(13,4)"<Q>uit and return to MENU."
350 A$="::::: (Y/N/Q) :::::> [":N=1:E=15:F=22:GOSUB 55:XX=1:XXX=2:GOSUB 49:C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 350 ELSE IF B$="" THEN 350
351 IF B$="Q" OR B$="q" THEN GOSUB 35:GOTO 10
352 IF B$="N" OR B$="n" THEN GOSUB 344:GOTO 346
353 IF B$="Y" OR B$="y" THEN 354 ELSE 350
354 CO=4:PR=1:GOSUB 322:GOSUB 174:GOSUB 291:CO=0:PR=0:GOSUB 35:GOSUB 357:GOSUB 35:GOTO 10
355 GOSUB 356:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"    "+S07$:LPRINT:LPRINT:N=N+1:RETURN
356 IF S01$="N/A" THEN LPRINT:RETURN ELSE LPRINT S01$:RETURN
357 PRINT FNAT$(15,24);"[Finished Printing Labels]";:FOR Z=1 TO 2000:GOSUB 381:NEXT Z:RETURN
358 OPEN "R",1,FIL$,128:FIELD#1,128 AS RR$
359 S02$=FI$:S03$=LA$:S01$=CO$:S02$=FI$:S03$=LA$:S$=S01$+";"+S02$+";"+S03$+";"+S04$+";"+S05$+";"+S06$+";"+S07$+";"+S08$+";"+S09$
360 RL=128:GOSUB 149:PUT#1,UJ:CLOSE:RETURN
361 CO=CO:LPRINT CHR$(140):LP=0:LPRINT S01$:N=N+1:RETURN
362 CO=CO:LPRINT CHR$(140):LP=0:LPRINT S01$:LPRINT S02$+" "+S03$:LPRINT S04$:LPRINT S05$+", "+S06$+"  "+S07$:LP=0:LPRINT:N=N+1:RETURN
363 A$="[LIST TO PRINTER INSTEAD OF CRT (Y/N)] [":N=1:E=16:F=15:GOSUB 55:XX=1:XXX=2:GOSUB 49
364 C=1:GOSUB 68:A$=B$:IF LEN(B$)>1 THEN 363 ELSE IF B$="" THEN 363
365 IF B$="Y" OR B$="y" THEN PR=1:GOSUB 322:GOSUB 369:RETURN
366 IF B$="N" OR B$="n" THEN PRINT CHR$(26):RETURN
367 IF LP=20 THEN GOTO 368 ELSE LPRINT "   Name: ";S02$;" ";S03$;SMID$;"Phone: ";S08$:LPRINT "Company: ";S01$;CMID$;"City: ";S05$:LPRINT:N=N+1:RETURN
368 CO=CO:LPRINT CHR$(140):LP=0:N=N+1:LP=0:RETURN
369 LPRINT "MAILING LIST ROLADEX":LPRINT STRING$(20,"-")::LPRINT:RETURN
370 SMID$=STRING$(34-LEN(S02$+" "+S03$),32)
371 CMID$=STRING$(35-LEN(S01$),32)
372 PRINT "   Name: ";S02$;" ";S03$;SMID$;"Phone: ";S08$:PRINT "Company: ";S01$;CMID$;"City: ";S05$:PRINT
373 RETURN
374 ED=1:GOSUB 127
375 OK=0:GOSUB 173:QQ=0:ED=0:B$=""
376 IF CO$="N/A" AND FI$<>S02$ AND LA$<>S03$ THEN 135 ELSE IF CO$="N/A" AND FI$<>S02$ AND LA$=S03$ THEN 135 ELSE IF CO$="N/A" AND FI$=S02$ AND LA$=S03$ THEN 328 ELSE IF CO$<>"N/A" AND CO$=S01$ THEN 328 ELSE 131
377 GOTO 374
378 IF BEL=-1 THEN BELL$="= ON =  "
379 IF BEL=0 THEN BELL$="= OFF ="
380 RETURN
381 IF BEL=-1 THEN PRINT CHR$(7);
382 IF BEL=0 THEN 383
383 RETURN
 ON =  "
379 IF BEL=0 THEN BELL$="= OFF ="
380 RETURN
381 IF BEL=-1 THEN PRINT CHR$(7);
382 IF BEL=0 THEN 383
