Office Manager

Author(s): Joseph Glass
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v4 n4 (Volume 4, Issue 4)
Date: April 1983
Pages: 20-21

Office Manager creates and stores three separate files: a phone directory, report file (each 150 lines max.), and memo file (20 lines max.).

You can move freely from one file to another without reloading from tape or disturbing data in any file. To switch files, type END, ENTER, and the menu reappears. Select the new mode and ENTER.

When using the report or memo option, you can only enter one line at a time. Type in each line and ENTER after each one.

Enter phone numbers last name first. You can search for entries by last name or initial. Report and memo options cannot search.

If you get an error 5/(line number) when viewing files, the screen is full. Hit CONT to go on. GOTO 5 returns you to main menu.

You can save file information on tape or print it out.

Print option asks which lines you want to print. If you want to print only a portion of a file, find the starting and ending line numbers by selecting display options 3, 6 or 9 (depending on the file). The screen displays the start and end slots of each file. Each line of your file occupies 1 slot. Calculate your start and end line slots. Enter these numbers when you return to print option–your ZX/TS prints just those lines.

First time you load the program dimension the files by entering: DIM F$(321,31) then, enter GOTO 1.

Inverse graphics are:

20 space Office space Manager 7 spaces T/S space 1000 space
2403 11 graphic sevens
2709 18 graphic sevens
2720 space File space Slot 2 spaces

Variables

F$=File string array
C=Menu choice
Z$=Any input or choice
L=Line counter; subscript
S=Start print line
F=Finish print line
D=Data input (search mode)

   1 REM OFFICE MANAGER USES AN ARRAY (F$) 321 BY 31. THIS MUST BE ENTERED BY DIRECT COMMAND.
5 FAST
10 CLS
15 PRINT
20 PRINT " OFFICE MANAGER T/S 1000 "
25 PRINT
30 PRINT TAB 5;"1 OPEN PHONE BOOK"
35 PRINT TAB 5;"2 SEARCH PHONE BOOK"
40 PRINT TAB 5;"3 ALTER PHONE BOOK"
45 PRINT
50 PRINT TAB 5;"4 OPEN REPORT FILE"
55 PRINT TAB 5;"5 VIEW REPORT FILE"
60 PRINT TAB 5;"6 ADD TO REPORT"
65 PRINT
70 PRINT TAB 5;"7 OPEN MEMO FILE"
75 PRINT TAB 5;"8 VIEW MEMO FILE"
80 PRINT TAB 5;"9 ALTER MEMO FILE"
85 PRINT
90 PRINT TAB 4;"10 PRINT FILE"
95 PRINT TAB 4;"11 SAVE ALL FILES";TAB 4;"12 VIEW ALL FILES"
100 PRINT AT 21,0;"ENTER CHOICE"
105 INPUT C
110 IF C<1 OR C>12 THEN GOTO 100
150 GOSUB 2000
160 IF C=1 OR C=3 THEN GOSUB 2100
165 IF C=4 OR C=5 OR C=6 THEN GOSUB 2200
170 IF C=7 OR C=8 OR C=9 THEN GOSUB 2300
175 IF C=10 THEN GOTO 2400
180 IF C=11 THEN GOTO 2500
185 IF C=2 THEN GOTO 2700
190 IF C=3 OR C=6 OR C=9 THEN GOTO 2800
191 IF C=12 THEN GOTO 2900
195 PRINT "TYPE ""END"" TO EXIT"
200 IF C=1 OR C=4 OR C=7 THEN INPUT F$(L)
205 IF F$(L,1 TO 3)="END" THEN GOTO 2600
210 PRINT F$(L)
215 LET L=L+1
220 IF C=1 AND L>150 OR C=3 AND L>150 THEN GOTO 2600
225 IF C=4 AND L>300 OR C=5 AND L>300 OR C=6 AND L>300 THEN GOTO 2600
230 IF C=7 AND L>320 OR C=8 AND L>320 OR C=9 AND L>320 THEN GOTO 2600
235 GOTO 200
250 STOP
300 REM SUBROUTES FOLLOW
2000 CLS
2005 PRINT
2010 RETURN
2100 LET L=1
2105 RETURN
2200 LET L=151
2205 RETURN
2300 LET L=301
2305 RETURN
2400 GOSUB 2000
2401 PRINT "PARAMETERS:"
2402 PRINT "▀▀▀▀▀▀▀▀▀▀▀"
2403 PRINT "PHONE= 1 TO 150";TAB 0;"REPORT= 151 TO 300";TAB 0;"MEMO= 301 TO 320"
2404 PRINT
2405 PRINT "STARTING LINE?"
2410 INPUT S
2415 PRINT "FINISH LINE?"
2420 INPUT F
2425 PRINT AT 10,0;"PRINTING FILE SLOTS:";TAB 0;S;" TO ";F
2430 LET L=S
2435 LPRINT F$(L,1 TO 31)
2440 LET L=L+1
2443 IF L=F THEN GOTO 2600
2445 GOTO 2435
2500 GOSUB 2000
2505 PRINT "ALL FILES WILL BE SAVED IN THE STANDARD SINCLAIR FORMAT."
2510 PRINT
2515 PRINT "SIMPLY PRESS ENTER..."
2516 INPUT Z$
2518 SAVE "FILES"
2520 GOTO 1
2600 PRINT AT 21,0;"KEY ENTER TO CONTINUE"
2605 INPUT Z$
2610 GOTO 10
2700 GOSUB 2000
2705 PRINT "ENTER SEARCH DATA"
2709 PRINT "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"
2710 INPUT Z$
2711 LET D=LEN Z$
2715 LET L=1
2720 IF F$(L, TO D)=Z$ THEN PRINT " FILE SLOT ";L;TAB 0;F$(L)
2725 LET L=L+1
2730 IF L>150 THEN GOTO 2600
2735 GOTO 2720
2800 GOSUB 2000
2805 IF F$(L,1 TO 3)="END" THEN GOTO 2820
2810 LET L=L+1
2815 GOTO 2805
2820 PRINT "FILE ENDS AT SLOT: ";L
2825 PRINT "ENTER DATA--END TO EXIT"
2830 INPUT F$(L)
2835 IF F$(L,1 TO 3)="END" THEN GOTO 2600
2840 PRINT F$(L)
2845 LET L=L+1
2850 IF C=3 AND L>150 THEN GOTO 10
2855 IF C=6 AND L>300 THEN GOTO 10
2860 IF C=9 AND L>320 THEN GOTO 10
2865 GOTO 2830
2900 GOSUB 2000
2905 FOR L=1 TO 320
2910 PRINT F$(L)
2915 NEXT L
2920 GOTO 2600
3000 REM OFFICE MANAGER WAS WRITTEN BY JOSEPH GLASS. ALL RIGHTS RESERVED. (C)1983
SYNTACTIC SUM: 30199, 8K ROM

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.