A&B Computing


File It With FilePlus

Categories: Review: Software
Publisher: Watford Electronics
Machine: BBC Model B

 
Published in A&B Computing 2.03

Watford Electronics take on the competition with their own ROM-based business database

File It With FilePlus

Among the advantages of the Beeb are that the machine specification is so advanced and the user base is so large (over 370,000). As a result, really effective business software is still being written for it nearly three years after the launch.

Much of it is in ROM (Read Only Memory), which helps to overcome the limitation of the Beeb's user RAM size, and uses discs, which greatly increase storage capacity and transfer speed. Hence, while the Beeb is not sold with disc drives as standard, they are an increasingly popular option.

Now, alongside three ROM word processors and two ROM spreadsheets, there are at least four ROM-based database programs - StarBase, DataGem, File-Plus and Merlin. I have already reviewed StarBase (October 1984) and DataGem (December 1984) and hope to review Merlin shortly.

Introduction

Like word processors and spreadsheets in their respective applications, all database programs can be used to create many completely different datafiles. File-Plus differs from StarBase in being program-, as well as menu-, driven. For file creation, data entry and simple searching you drive it by pressing function keys, according to a menu of labels on the screen. However, for operations involving more complex searches and calculations, it has a simple command or query language with just twelve keywords.

File-Plus is capable of both key indexed direct (or random) access as well as of sequential access. Indeed, you can have as many indexes as you wish (e.g. sorted on different fields). It thus differs notably from DataGem, which is almost wholly driven by command keystrokes (as opposed to menus or command file programs) and offers only sequential access.

Installation

File-Plus consists of a single 16K ROM chip which should be installed in one of the Sideways ROM sockets. There is also a utility disc, which holds the routines for creating and using the sorted key indexes. File-Plus (like DataGem but unlike StarBase) is independent of BASIC which therefore need not be installed in the machine.

Constraints

File-Plus, like all its competitors, operates in Mode 7. The maximum length of a text field is a single line, reduced by the two-character field tag and the leading and trailing spaces which define a field, to 36 characters. This is not as long as for DataGem (with 120 characters), StarBase (with 255 characters) or Merlin (with 900 characters).

However, File-Plus allows a program to be written, to read the whole file and then search not just one but several or all fields if necessary. (DataGem also allows all fields to be searched, by using a wildcard in the search field tag.) This feature is often useful e.g. when you require plenty of space for keywords, to characterise documents in a bibliographic database.

In File-Plus a numeric field can have up to 16 characters - an optional negative sign, an integer of up to 10 digits, an optional decimal point and a decimal fraction of up to four digits. Numeric data is stored in an integer (Binary Coded Decimal) format which allows unusually high precision in representing and manipulating it. This exceeds the nine figure precision (itself unusually high) of real numbers in BBC Basic.

The theoretical maximum length of a record is 2400 characters - since it can extend to up to three pages of 40-characters by 20 lines each. The number of fields per record is limited only by the need to fit them all within the maximum record length. With a full complement of maximum-length text fields, the net record length would be 36 x 20 x 3 = 2,160 characters. The maximum record length is also reduced by the presence of field titles/background text.

The maximum number of records is not limited by the File-Plus program if only sequential access is required. If, however, key indexed access is required, the present sort routine limits the number of records to a maximum of 5,461 (sorted on one text field to a minimum depth of two characters) or 2,730 (sorted on one numeric field to the implied depth of eight characters).

Due to the way that File-Plus holds the datafile, its maximum size can approach the full (formatted) capacity of the disc storage system - whether single-density floppies, double-density floppies or Winchester (see below).

File Creation

After entering the program with *FILEPLUS the main of several menus, which labels the uses of the red function keys, is displayed (see Fig. 1).

Selecting f0 'Design a Form' brings a sub-menu which allows you to design your input form, using the "paint-a-screen" technique. Thus the cursor is positioned, the field title entered (in white) and f3 pressed to mark a data field. This is shown in green and you start with a two-letter field tag (a name by which it is known to the computer), followed by the required number of character-spaces and end by entering f3 again.

Data fields may be either text, marked with T's, or numeric, marked with "O's". Any number of fields may be so defined within the three pages, helped by the use of other function keys to insert and delete lines.

Like StarBase (but unlike DataGem). no special date type is available so dates must be entered in (YY)YYMMDD. format and as numbers if you want to sort, compare and calculate with them correctly.

You can save your form design by pressing fl when you will be prompted to enter a filename. It is very helpful to put all such forms into a separate directory eg "F" to distinguish them from other types of files. You then return to the main menu by pressing the Escape key.

File-Plus has been designed so that the datafile is saved in a way which enables it to make best use of various disc systems and allow rapid loading and saving for rapid searching. Thus it consists of a chain (or "linked list") of separately named files, each of 11K. Up to nine can fit on a standard 40-track disc, up to 18 on a standard 80-track disc and up to 29 on an 80-track disc using typical double-density recording. This list allows almost full usage of the disc space while remaining within the 31-file limit of the standard Acorn Disc Filing System (DFS).

This type of file organisation means that a file can be lengthened in place as required (by creating additional file blocks). With this scheme it is not necessary to guess how long the datafile (chain) will ultimately have to be. Thus the length is not fixed on initialisation so that it can only be increased by copying across into a larger version of the file (as with StarBase and DataGem).

Only the first file of the chain is set up initially - by pressing f5 to "Set up a New Data File" and then entering a filename. This should always include a drive number as the datafile chain can extend over any number of surfaces. It can also usefully use a directory which distinguishes it from other types of file (such as "forms" above and "indexes" and "programs" below).

The filename can best be chosen to allow a natural chain by having a name end with, for example, two or three digits. This unambiguous file specification will ensure that the file is always found, whatever the current values of the drive and directory.

After returning to the main menu by pressing Escape you can now add records. If you have just switched on, it is first necessary to select f0 "Design a Form" and f0 "Load (Form) File", input your form filename and press Escape to return to the main menu. You can then press f2 to "Add Records", whereupon you are asked to enter a (data) filename.

The screen will then display a blank of the current form (with the text fields containing spaces and numeric fields containing zeros) but not showing their extent in either case. However, the cursor will be at the start of the first field and you will hear a beep if you try to type beyond the end. The Tab key moves the cursor on to the start of the next field.

A full screen editor mode operates during data entry (so you can cursor back and just overwrite to correct an error). When you have filled the first 11K datafile, you are prompted to enter the next filename in the chain.

A File-Plus "form" and "program" is available on request that enables a new datafile to be created by importing an ASCII-formatted file from disc. This allows transfers from other databases.

Printed And Spooled Output

Like the input, the output format is controlled by a "form". This may consist of any or all of the data fields or values, in any order and repeated if necessary. These may be modified by a program which, for example, assigns new values or calculates them from those in the datafile.

One possibility is for the output form to consist of a "form letter" containing field tags which may correspond to name and address. Such a letter may consist of up to a theoretial maximum of 40 x 20 x 3 = 2,400 characters (approx 400 words) of background text, less appropriate allowance for the data fields.

Forms can also contain embedded commands for printing control, of which there are 100 different types. These enable full control of the printout such as the addition of the header, e.g. of field titles, to each printed page, and setting the width and length of the printed page, together with any print modes of which the printer is capable (eg normal/elite/condensed, normal/emphasised, etc). You may wish to cancel the spaces associated with the field tags, using Back Space (i.e. 08 in Hex).

Output can also be as a file "spooled" to disc, and this too is controlled by a form. One possibility is to spool out a file containing various name and address fields for merging into a standard letter. This file can be READ into, and then a series of differently addressed letters printed from, the View Word processor, by using its "macro" facility.

Indexing

To enable key indexed access or sorted output, File-Plus has a sort utility. This is on disc (as opposed to being in the ROM) and can at present accommodate a sort file of 32K.

Since each text field has a four character overhead and depths must have even values, this corresponds to up to 5,461 records if sorted on a single text field to a depth of two characters, 4,096 on four characters, 3,276 on six characters, 2,730 on eight characters and 2340 on the maximum depth of nine characters. Numeric fields may be sorted only to their full implied length of eight characters. Hence the maximum number of records which can be sorted on one numeric field is 2730.

Creating an index, ie sorting, is possible on any single field or combination of fields (up to five). Because of the overhead of four characters per field, sorting to a given depth on two fields reduces the maximum number of records to less than half that for one field. The sort routine sorts in ascending ASCII sequence (i.e. taking account of upper/lower case) but does not allow sorting on one field at a time - even by sorting the least important first.

The sort operation may require more workspace than can be provided in the memory of the Beeb so this is sought on disc. As it can be up to 65K (at present), there is an option to write the work files to a disc separate from the data disc(s). In this case, the resulting key index file should be copied back to the data disc(s), preferably into directory "I", to distinguish it from other types of files.

You can create multiple indexes sorted on any field or combination of fields and these can be created on subsets, e.g. the results of searches, of the main data file. The indexes are not saved automatically with the main datafile nor maintained up to date (ie with later entries included in the sorted order) as in the Merlin database.

Searching

Searching may use key indexed access, in which case you have to load additional code into RAM and then enter the index filename. Pressing f6 from the main menu will then enable key indexed access and pressing 3 will enable "Display Records" which executes an inbuilt default program.

You are then asked to enter the name (tag) of the field you wish to search on, followed by - "less than", "equal" or "greater than" and a search string or number (in the first sorted field). This can be of any length (up to the maximum of 36 text characters or a 14-digit number) and is independent of upper/lower case.

Searching defaults to sliding (ie it can skip any number of leading characters in the field) but it is much quicker if padded with wildcards to the correct position in the field. Wildcards may also be embedded within the search string.

When using key index access, searching may be repeated in order to refine the subset. The in-built default program causes the record containing the target string to be displayed. From there it may be added (ie replicated), deleted, updated, printed or spooled. If the datafile or subset contains more than one record, they may be stepped through by pressing f0.

If no. key index file is available for the target field, searching is still possible on text fields, using sequential access. (Numeric fields require COMPARE in this case, see below). This is particularly valuable, as the number of records is then limited only by the capacity of the disc drive(s).

Sequential access searching is still notably fast with File-Plus, since it uses the Beeb's OSFILE command to locate the 11K datafile blocks in one go, whereupon searching proceeds at in-memory speed. (This is very similar to DataGem - which has only this method of searching.) Furthermore, since you have to enter the data filename before using sequential access, you can enter one part-way along the chain (which may correspond roughly to the date when it was entered) in order to further speed the search.

Also, unlike StarBase and DataGem, you do not suffer from the time taken to search the full (initialised) datafile, even before it has been filled up. Even so, it takes only 30 odd seconds to search 100K when using the Acorn 0.90 DFS which is some three times as fast as StarBase.

As with other database programs (but to a lesser degree, because of the reduced number of load/read operations), the search time can be reduced by using a faster DFS such as the Watford 1.3 or the Acorn 1.2 (as used in the DNFS).

In a database driven by a user-written command language file, or program, a sequence of operations may be initiated by a single key (once the program file is loaded). This is especially worthwhile when it is long enough to be difficult to key in interactively, ie via menus, and it is needed repeatedly, e.g. each month, each week etc. A typical example would be automatically totalling the sales of a range of products.

The main difference between File-Plus and its competitors is that it is also capable of being driven by "command files" or programs which may also be saved. Such programs can occupy up to 40 x 40 character lines = 1600 characters, spread over two pages and each line may contain more than one statement, separated by colons - as with the BBC BASIC. (DataGem is largely "command-driven", but the length of command file that can be saved is limited to only 256 characters and it cannot be edited). The lines are un-numbered but two letter labels are allowed and the File-Plus Query Language, FQL, has 12 keywords - see Fig. 2. These include SEARCH for text strings (with conditional and unconditional looping eg to examine a series of records) then READ, which may be followed by ASSIGN, COMPARE (numbers), DISPLAY, UPDATE, PRINT and/or SPOOL.

From the main menu you can press f1 "Program Entry" and then either type in a new program or load a previously saved program. Then you can return to the main menu by pressing Escape and press f4 to "Execute a program".

You can have as many programs (and forms and indexes) as you like, saved under different filenames, which can operate on the same (or different) datafiles, but only one at a time. Within this limitation, File-plus can be used to set up custom database systems.

It is also possible to put the names of frequently needed files eg indexes, datafiles, forms and programs (followed by RETURN) onto function keys, which can be invoked from within File-Plus by pressing Ctrl-Shift-Function Key. These settings can be saved using *SAVE filename 0B00 0BFF - this being the function key buffer area.

If different directories "F" and "P" are used, the forms and programs that go together can use the same filenames. This is also true for "I" indexes and even "D" datafiles.

Program files can be printed out from within File-Plus, using *FX 3,0 *LIST (filename). It may also be possible for form files but they contain embedded control codes which may upset the printer. Form and program files can be printed out from outside File-Plus, using Ctrl-B, *LIST or *DUMP filename, Ctrl-C.

Calculations

The four standard arithmetical operators + - * / are provided, together with unary minus. All six Boolean comparison operators =,<,>,<>,<=,>= are also provided, together with the logical combinations operators AND and OR. The operations normally follow a precedence table but this can be overridden by using brackets.

Either a number or an expression may be ASSIGNed to a numeric field, while a text string may be ASSIGNed to a text field, overwriting the old value in each case. The new value can be written back to the datafile using UPDATE. All six Boolean comparisons may be tested for on numeric fields (using COMPARE), whereas only "equals" may be tested for on text fields.

File-Plus has 10 (numeric only) memory or file variables, which may be used to hold, for example, totals across records etc.

Security

File-Plus has no provision for using passwords to limit access (unlike Starbase and Data Gem). In any case (like StarBase), File-Plus datafiles can be read very simply using *LIST, *TYPE or *DUMP.

Compatibility And Robustness

File-Plus works with the Acorn 0.90, Watford 1.3 and Acorn 1.2 DFSs. It also works with the Watford Double Density Disc Interface which allows a database of around 1.4 MB with twin double-sided 80-track drives, and should therefore work with most others.

A chain of File-Plus 11K datafiles can also be stored on a Winchester (hard) disc, with the maximum number being determined by the disc filing system (sometimes called a Winchester Filing System - WFS). Several of the WFSs divide the total disc surface into a number of Acorn DFS compatible "pseudo-surfaces", each of which can hold up to the standard 31 files. It thus seems unlikely that it will also be compatible with the new Acorn Advanced DFS - as used both with double-density floppy discs (on the Electron Plus 3 and ABC Personal Assistant) and with the new Winchester discs. Indeed, all File-Plus filenames can consist of up to 18 characters in total, hence there is ample space for drive numbers (for DFS), directories, sub-directories (for ADFS), as well as a name of up to seven characters.

File-Plus works with PAGE=&1900, as with the Acorn DFS in operation. Thus it may also work with only the Econet Net Filing System in operation, but not both the DFS and NFS at once (unlike StarBase and DataGem). It will not work from the 6502 Second Processor. File-Plus includes no fewer than 38 system (help) messages, all in plain English, which inform you about most eventualities. Upon request you can obtain a BASIC program to reset the pointers of any File-Plus datafile that has become corrupted.

Manual

The manual, with its 73 A5 pages, may be described as adequate. The text has been daisywheel printed and the pages are held together with an open-flat plastic spine.

Most of the features, and the File-Plus Query Language, are described well enough and in a logical order. Several examples are also included of output forms (some with embedded commands for printing control) and of programs written in the File-Plus Query Language. These provide the only illustrations of some of the finer points, despite the provision of a seperate section on Hints and Tips. However, there is a very useful section expanding on the system (help) messages.

Growth Potential

All databases tend to grow with time - in record length, in number of records, in complexity of search and calculation and in the variety of output formats.

To add a field to a File-Plus record you just add it to the current input form, then read each record, delete it from the file and re-add the new version to the file. The maximum net record length is amply large for most purposes - at up to 2160 characters over three Mode 7 pages.

File-Plus allows the datafile size and hence the number of records to be increased in a particularly easy fashion by naming more files as required.

However, if key indexed random access is required, the File-Plus sort routine limits the number of records per file (to 5461 records if sorted on one text field to a depth of two characters or 2730 if sorted on one numeric field). This limit could be raised by modifying the sort routine since it is on disc and uses another disc for temporary workspace. For example, it could be at least doubled (though this would require an 80-track disc).

Unlike several of its competitors, the number of records per file is not limited by factors within the ROM (eg Starbase to 4096, Merlin to 4000, DataGem to 5110). In priciple this means that in sequential access, it could exceed even CP/M database programs (which typically allow up to 32,000 but require a Torch or Acorn Z80 Second Processor). The only other database program offering a maximum number of records of this order for the single-processor Beeb is the disc-based DataMinder (26,600 - and that with key indexed access).

File-Plus can work with 40- or 80-track (floppy disc) drives, one, two, three or four surfaces and single or double density recording - permitting datafiles of up to 1.4 MB. It also seems likely to be able to work both with most of the non-Acorn Winchester Filing Systems and with the recently announced Acorn Advanced DFS which could allow datafiles of 10 MB or more.

The ability to store programs means that complex procedures can be carried out on a regular basis with significantly less risk of error or of corrupting the datafile than if the database program were only menu-driven.

The output formats, defined by forms and programs, can be printed out in any fashion of which the printer is capable, and they may be increased virtually without limit.

Fig.  
FILE-PLUS ROAD MAP
Main Menu Sub-Menus
f0 Design a Form f0 Load (Form) File
f1 Save (Form) File
f2 Page 00
f3 Mark Field
f4 Delete Field
f5 Insert Line
f6 Delete Line
f1 Program Entry f0 Load (Program) File
f1 Save (Program) Five
f2 Page 00
f3 Insert Character
f4 Delete Character
f5 Insert Line
f6 Delete Line
f2 Adding Records f0
f1 Add Record
f2
f3
Ctrl-f4 Print Record
Ctrl-f5 Spool Record
f6
f3 Display Records f0 Skip this Record
f1 Add this Record
Ctrl-f2 Delete this Record
Ctrl-f3 Update this Record
Ctrl-f4 Print this Record
Ctrl-f5 Spool this Record
f6
f3 Display Records f0 Skip this Record
f1 Add this Record
Ctrl-f2 Delete this Record
Ctrl-f3 Update this Record
Ctrl-f4 Print this Record
Ctrl-f5 Spool this Record
f6
f4 Execute a Program  
f5 Set Up a New Datafile  
f6 Index File Closed (Load ASSIST, press f6 to open)
* Execute a Star Command
ESC Return to Main Menu

Fig. 2
FILE-PLUS QUERY LANGUAGE KEYWORDS
ASSIGN
text, number or expression to field

COMPARE
field value with text string or number & set flag

DISPLAY
last record READ from datafile, using current form

END
program

GOTO
label

IFF
(if flag false) then goto label

IFT
(if flag true) then goto label

PRINT
this record, using current form

READ
next record from data file

SEARCH
datafile for text string in field

SPOOL
this record to file on disc, using current form

UPDATE
last record READ from datafile with this

Conclusions

File-Plus is not quite as versatile as StarBase or DataGem in the designing of the output form, but it allows a maximum record length more than double that of StarBase.

The File-Plus datafile organisation is much better than either StarBase or DataGem (in that it can be extended in places later) and, like DataGem, can make full use of all four floppy disc surfaces permitted by the Acorn DFS and probably of most double-density and Winchester filing systems as well.

Although sorting/indexing is less easy than in StarBase it can be to a greater depth, and multiple indexes on any fields are possible, which can give much faster access than with DataGem.

In sequential searching, File-Plus is much faster than StarBase and comparable with DataGem.

As well as being capable of being menu-driven for most simple operations - searching, printing and spooling - File-Plus can be driven by command files or programs which can be saved. This enables more complex operations including comparison and calculations to be carried out easily and without error as often as required. Custom systems can therefore be set up with it.

By using forms to control the output format for printing or spooling, File-Plus allows as much flexibility as StarBase or DataGem. All three can produce a short form letter without requiring a word processor and can produce names and addresses etc for merging into a letter in View, using the macro facility.

Overall, File-Plus is slightly less easy to use than StarBase on a casual, infrequent basis but much more capable and easier to use on a repeated basis (due to the longer records, faster sequential searching and saveable programs).

File-Plus is slightly less capable than DataGem but quicker and much easier to use (due to the indexed access and longer, editable and saveable programs). It also has extensive meaningful system (help) messages and compares very well in value for money.

File-Plus costs £49.45, including VAT, and is available now from Watford Electronics, 33 Cardiff Road, Watford, Herts. Tel: Watford (1923) 40588.

This article was converted to a web page from the following pages of A&B Computing 2.03.

A&B Computing 2.03 scan of page 40

Page 40

A&B Computing 2.03 scan of page 41

Page 41

A&B Computing 2.03 scan of page 42

Page 42

A&B Computing 2.03 scan of page 43

Page 43