While there are a few “Data Base” software for the 2068 such as PROFILE, I opted to roll my own simple program. This program can be used for any record keeping or filing such as video cassette library, telephone directory, floppies, CDs, addresses, membership list etc. As written, the program will keep 1000 records 32 characters each with 3K of memory left over.
The Menu Selections:-
- 1. Start a NEW records file.
- 2. Add or UPDATE a record.
- 3. LIST the records to the screen starting anywhere in the file.
- 4. FIND a record or title by ENTERing the first 3 characters or digits. (It is fast!)
- 5. SEARCH (wild-card) by ENTERing letter(s), number(s), or a combination thereof, especially if the spelling is unknown, the computer will find them in due time. Or to list records having something in common.
- 6. CORRECT. If a mistake is found while LISTing the records, ENTER the record number, the record will be on the screen, reENTER it correctly.
- 7. PRINT. Select what to be printed and the left margin, send it to large printer. Four columns can be printed on the same page using condensed fonts to reduce paper shuffling.
- 8. SORT the records alpha/numerically using SHELL SORT routine which is the fastest for this application, about 100 records per minute.
- 9. CATalog disk.
- 10. SAVE “program” LINE 10. Use GOTO G if you break; do not RUN except for the first time after typing the program.
5 DIM O$(1000,32)
10 CLS : LET G=10: LET H=100
12 POKE 23658,8: POKE 23609,10: PAPER 1: INK 9: BORDER 1: BEEP .03,40: BEEP .05,42: BEEP .03,45
15 PRINT PAPER 5;"RcorDBase by Abed Kahale 1992"
20 PRINT '"1 - Start a NEW File"
25 PRINT '"2 - ADD new record(s)"
30 PRINT '"3 - LIST records"
35 PRINT '"4 - FIND a record"
40 PRINT '"5 - SEARCH, Wild-Card "
45 PRINT '"6 - CORRECT an entery"
50 PRINT '"7 - LPRINT records list"
55 PRINT '"8 - SORT records"
60 PRINT '"9 - CATalog disk"'TAB 19; INVERSE 1;"FREE MEMORY"
65 PRINT "0 - SAVE to disk";TAB 24; INVERSE SGN PI; FREE
70 PAUSE NOT PI
100 LET L$=INKEY$
110 IF L$="1" THEN GO SUB VAL "200"
120 IF L$="2" THEN NEXT J
130 IF L$="3" THEN GO SUB VAL "600"
140 IF L$="4" THEN GO SUB VAL "700"
150 IF L$="5" THEN GO SUB VAL "900"
160 IF L$="6" THEN GO SUB VAL "3000"
170 IF L$="7" THEN GO SUB VAL "4000"
175 IF L$="8" THEN GO SUB VAL "8000"
180 IF L$="9" THEN CLS : RANDOMIZE USR H: CAT "",: PAUSE 0
190 IF L$="0" THEN GO SUB VAL "9000"
195 GO TO G
230 FOR J=1 TO 1000
240 CLS : PRINT '"ENTER ""Z"" TO TERMINATE ENTERIES"
250 PRINT AT VAL "10",VAL "10";"ITEM NUMBER "; FLASH 1;J
260 INPUT "Title, Cassette# & Counter read-ing?"'' LINE C$
265 IF LEN C$>32 THEN BEEP .5,40: PRINT INVERSE SGN PI;" Over 32 Characters - ReENTER ": PAUSE NOT PI: GO TO VAL "240"
270 IF C$="Z" THEN GO TO G
320 PRINT ''C$
330 PRINT ''"If Correct"; INVERSE SGN PI;" ENTER"; INVERSE NOT PI;" If Not, ENTER any letter"
340 INPUT Z$
350 IF Z$<>"" THEN GO TO VAL "240"
360 LET O$(J)=C$
380 NEXT J: RETURN
630 CLS : INPUT "START WITH # ";Q
640 FOR M=Q TO J
650 PRINT PAPER PI;M; PAPER SGN PI;O$(M): NEXT M
655 PRINT 'TAB VAL "20"; INVERSE 1;" NO MO ": PAUSE NOT PI: RETURN
720 CLS : INPUT "Title? (First 3 Letters)"'' LINE N$
722 PRINT "LOOKING FOR>>-> ";N$
730 FOR M=1 TO J
740 BEEP .005,38: IF O$(M)( TO 3)=N$( TO 3) THEN GO TO 770
750 NEXT M
760 PRINT 'TAB VAL "20"; INVERSE SGN PI;" NO MO ": PAUSE NOT PI: RETURN
770 PRINT INVERSE 1;M; INVERSE 0;O$(M)
775 GO TO 750
780 PAUSE NOT PI: RETURN
890 REM ----==(WILD CARD SEARCH)==----
900 CLS : INPUT "ENTER any character(s)!"'' LINE X$
905 PRINT "SEARCHING FOR>=-> ";X$
910 PRINT : POKE 23692,255
915 FOR N=1 TO J
920 FOR K=1 TO 33-LEN X$
930 IF O$(N,K TO K+LEN X$-1)=X$ THEN GO TO 960
935 NEXT K: NEXT N
940 PRINT 'TAB 20; INVERSE SGN PI;" NO MO ": BEEP .5,40: PAUSE NOT PI: RETURN
960 BEEP .03,40: PRINT O$(N)
965 GO TO 935
970 RETURN
1000 REM DELETES SPACES AFTER SORTING
1020 FOR N=1 TO J: LET O$(N)=O$(N+1)
1025 BEEP .005,40: NEXT N: GO TO G
3000 CLS : INPUT "ENTER Record # to be corrected"''N
3010 PRINT INVERSE SGN PI;O$(N)
3030 INPUT "ENTER the correction"''A$: IF A$="" THEN RETURN
3040 LET O$(N)=A$: RETURN
4000 CLS : RANDOMIZE USR H: OPEN #3,"LP"
4010 RANDOMIZE USR H: POKE 16092,0: RANDOMIZE USR H: POKE 16090,132: REM 132 columns
4015 INPUT "Left Margin?"''R
4030 RANDOMIZE USR H: POKE 16094,R: LPRINT : REM MARGIN
4035 OUT 127,27: OUT 127,20: REM Condensed style/font
4040 INPUT "Start printing with #"''Y'"End printing with #"''Z
4045 FOR N=Y TO Z: LPRINT O$(N): NEXT N
4050 RANDOMIZE USR H: CLOSE #3: RETURN
8000 CLS : REM -----===( SHELL SORT )===-----
8005 PRINT AT VAL "10",VAL "12";"STANDBY";AT VAL "13",VAL "10"; FLASH SGN PI;" SORTING "
8010 LET S=1
8020 LET S=S*2
8030 IF S<=J THEN GO TO 8020
8040 LET S=INT (S/2)
8050 IF S=0 THEN BEEP 1,30: RETURN
8060 FOR T=1 TO J-S
8070 LET Y=T
8080 LET W=Y+S
8090 IF O$(Y)<=O$(W) THEN GO TO 8150
8100 LET Z$=O$(Y)
8110 LET O$(Y)=O$(W)
8120 LET O$(W)=Z$
8130 LET Y=Y-S
8140 IF Y>0 THEN GO TO 8080
8150 NEXT T
8160 GO TO 8040
9000 RANDOMIZE USR H: SAVE "DBSMPL.BZ" LINE 10
9010 RANDOMIZE USR H: LOAD "L.B1"
Use (GOTO G) after BREAK
The Program
- Line 5 declares DIM(1000,32), 32K bytes, which can be any product not exceeding the memory available such as DIM(200,64) or DIM(250,4,32) for 4 lines address book.
- Lines 12 to 195 are for the Menu setup and Selection. A chirp sound is provided by line 12 and FREE memory is provided by line 65.
- Lines 230 to 380 are for ENTERing the records. Up to 32 characters long entries can be made in this case, but can be rewritten for other lengths.
- Lines 630 to 655 list the records starting with the record number INPUTed to the end of the file.
- Lines 720 to 780 search for a match at the beginning of each record of the three characters INPUTed and lists them to the screen.
- Lines 890 to 970 search for a match in every record of the character(s) INPUTed and lists them to the screen.
- Lines 1000 to 1025 delete any empty record cell that becomes record #1 after the SORT routine is completed.
- Lines 3000 to 3040 prints to the screen the record to be corrected and provides INPUT for the correct record.
- Lines 4000 to 4050 are for printing to a large printer using the LarKen disk interface to set the margin and 132 columns, also sets a Tandy DMP105 printer to print in condensed font. For a 2040 printer DELETE 4000,4035. Change line 4050 to 4050 RETURN.
- Lines 8000 to 8160 sort routine by the first character of every record in this order:- Blanks/spaces, Numbers then Alphabets. When the sort is completed all blank records will be at the beginning of the list. To remove the blank records, use GO TO 1000.
- For other than LarKen users, lines 180, 4000-4050, 9000, and 9010 will have to be rewritten accordingly.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.