50 CLSCR$=CHR$(26)
100 GOSUB 1000
120 PRINT:PRINT:PRINT
130 PRINT"1) DESCRIPTION OF FILE SYSTEM
140 PRINT"2) PICTURE OF PROGRAMS USED
160 PRINT"4)   LOAD AND RUN MENU
180 PRINT:PRINT
200 PRINT"WHICH ";
220 ALLOWED$="1234":GOSUB 5000:IF ALLOWED=0 THEN 100
250 ON Q  GOSUB 2000,3000
260 IF Q=4 THEN RUN"MENU
280 GOTO 100
1000 '
1010 '		***  DESCRIBE FILES ***
1020 '
1100 PRINT CLSCR$;
1110 PRINT TAB(15)"             ______________
1120 PRINT TAB(15)"           |_____________| |
1130 PRINT TAB(15)"         |_____________| | |
1140 PRINT TAB(15)"       |_____________| | | |
1150 PRINT TAB(15)"     |_____________| | | |_|
1160 PRINT TAB(15)"   |_____________| | | |_|
1170 PRINT TAB(15)"   |  ELECTRONIC | | |_|
1180 PRINT TAB(15)"   |     CARD    | |_|
1190 PRINT TAB(15)"   |     FILE    |_|
1200 PRINT TAB(15)"   |_____________|
1500 RETURN
2000 '
2010 '		DESCRIPTION
2020 '
2030 PRINT CLSCR$;
2100 PRINT"The MBASIC programming language is designed
2110 PRINT"to use sequential and random files. The E.C.F.
2120 PRINT"set of programs gives you access to random
2130 PRINT"files without having to write a BASIC program.
2140 PRINT"  Think of random files as a set of file
2150 PRINT"cards arranged in a tray. Each card can hold
2160 PRINT"up to 127 characters. Your first choice is
2170 PRINT"whether each card will hold 20, 40 or some
2180 PRINT"other number of characters. On a 90 K disk
2190 PRINT"you may fit about 500 127 character cards or
2200 PRINT"1000 60 character cards, along with the other
2210 PRINT"operating files. Normally you would choose a
2220 PRINT"card size so that one rocord, or set of infor-
2230 PRINT"mation would fit on a single card. But it is
2240 PRINT"possible to group up to 10 cards of any size
2250 PRINT"up to 127 characters into one record. The 
2260 PRINT"result is that if you ask to see record #3,
2270 PRINT"which may actually consist of 4 successive cards,
2280 PRINT"the programs will usually treat the information
2290 PRINT"as if it were on one big card instead of 4.
2300 PRINT:INPUT"TAP RETURN TO CONTINUE";FAKE$
2320 PRINT"Information is placed into sections of each
2330 PRINT"record (card, set of cards) called fields.
2340 PRINT"These fields must be defined when you establish
2350 PRINT"the file as to size and type of information.
2360 PRINT"4 types of information may be used.
2370 PRINT"  1) Numeric - uses 4 characters of space
2380 PRINT"  2) Dollar -  uses 8 characters of space
2390 PRINT"  3) Date - 2 characters in numeric form
2400 PRINT"  4) String - anything else
2410 PRINT"If you plan a card file of your friends, it
2420 PRINT"may start with a field for the first name.
2430 PRINT"This would be a string field and it would be
2440 PRINT"reasonable to allow about 10 characters.
2450 PRINT"Once you tell the computer to set up a field
2460 PRINT"called FIRST NAME with up to 10 characters,
2470 PRINT"all records (cards) will have 10 characters
2480 PRINT"set aside for this field. If you include a 
2490 PRINT"field for AGE and define it as numeric, 4 
2500 PRINT"characters of space will automatically be set
2510 PRINT"aside. If you are not going to do any calcu-
2520 PRINT"lations with AGE, you could save two characters
2530 PRINT"of space by defining AGE as a string field.
2540 PRINT:INPUT"  TAP RETURN TO CONTINUE ";FAKE$
2550 PRINT"Each record of your friends might look
2560 PRINT"like this.
2570 PRINT
2572 PRINT"                     (Characters used)
2574 PRINT"DATE ENTERED ______   (2)
2580 PRINT"FIRST NAME __________   (10)
2590 PRINT"LAST NAME _______________  (15)
2600 PRINT"STREET _________________________ (25)
2610 PRINT"CITY _______________  (15)
2620 PRINT"STATE __  (2)
2630 PRINT"ZIP _____ (5)
2640 PRINT"BIRTH DATE ______ (2)
2650 PRINT"PHONE NUMBER __________  (10)
2660 PRINT"FAVORITE COLOR __________  (10)
2670 PRINT"AVERAGE GIFT PRICE ____________ (8)
2680 PRINT"NUMBER OF CHILDREN ______  (4)
2690 PRINT"# OF YEARS GAVE GIFTS ______ (4)
2700 PRINT
2702 INPUT"   TAP RETURN TO CONTINUE";FAKE$
2710 PRINT"A total of 112 characters have been used.
2720 PRINT"Birth date is entered and displayed as a 6 digit
2730 PRINT"number, but is compacted and saved as a two
2740 PRINT"digit number. The phone and zip numbers are 
2750 PRINT"saved as strings since we want them to appear
2760 PRINT"exactly as entered, including leading zeros.
2770 PRINT"Gift price is saved as a dollar amount and
2780 PRINT"number of children and years of gift giving
2790 PRINT"are saved as numbers. 
2800 PRINT"  Later we can sort, select and print some or
2810 PRINT"all fields of all or selected records. It will
2820 PRINT"be possible, for example, to multiply the # of
2830 PRINT"gifts by the average price and get a total.
2840 PRINT"The DATE ENTERED field is automatically 
2850 PRINT"added to each record.
2880 PRINT
2890 INPUT"   RETURN TO RE-LIST CHOICES ";FAKE$:RETURN
2900 STOP
3000 REM
3010 PRINT CLSCR$;
3020 PRINT TAB(16)" ______________"
3030 PRINT TAB(16)"|              |     ___________
3040 PRINT TAB(16)"|     MENU     | <> |  CREATE   |
3050 PRINT TAB(16)"|    PROGRAM   |    |___FILE____|
3060 PRINT TAB(16)"|______________|
3070 PRINT
3080 PRINT"_____ 1 _____    _____ 5 _____    _____ 3 _____"
3090 PRINT"| > REPORT < |   | CHANGE, ADD|   | > LABELS < |
3100 PRINT"|            |   | DELETE OR  |   | PRINT UP   |
3110 PRINT"| ON SCREEN  |   |    VIEW    |   | TO 6 LINES |
3120 PRINT"| OR PRINTER |   |  RECORDS   |   | ON LABELS  |
3130 PRINT"|____________|   |____________|   |____________|
3140 PRINT
3150 PRINT"_____ 2 _____    _____ 6 _____    _____ 4 _____
3160 PRINT"|  ENTER     |   |  > MERGE < |   |  > SORT <  |
3170 PRINT"| FORMAT FOR |   | 2 SORTED   |   |  ON ANY    |
3180 PRINT"| LABELS OR  |   | LISTS INTO |   | FIELD OR   |
3190 PRINT"| REPORT     |   | 1 LIST     |   | COMBO. OF  |
3200 PRINT"|____________|   |____________|   |_OF_FIELDS__|
3210 PRINT"
3300 PRINT:PRINT
3320 PRINT"   Tap any key to return to MENU
3340 A$=INKEY$
3350 IF A$="" THEN 3340
3370 RETURN
5000 '
5010 '		ENTRY
5020 '
5100 PRINT CHR$(7);
5110 ALLOWED=0
5120 Q$=INPUT$(1)
5130 PRINT Q$
5140 IF Q$="y" THEN Q$="Y"
5150 IF Q$=CHR$(13) THEN Q$=DEFAULT$
5160 Q=VAL(Q$)
5170 FOR L=1 TO LEN(ALLOWED$)
5180 IF MID$(ALLOWED$,L,1)=Q$ THEN ALLOWED=1
5190 NEXT L
5200 RETURN
5210 '
5220 '
AL(Q$)
5170 FOR L=1 TO LEN(ALLOWED$)
5180 IF MID$(ALLOWED$,L,1)=Q$ THEN ALLOWED=1
5190 NEXT L
