home *** CD-ROM | disk | FTP | other *** search
-
- Maxifile-3
-
- MAXIFILE
-
- The original MAXIFILE program was written in 1985 for the BBC B to provide a
- simple database which maximised the number of records that could be handled
- entirely within memory. To make the most of limited space, overlays were
- extensively used. The software was used ever since for a wide variety of
- purposes in a secondary school, thus standing up to the tests of both
- practical use and time.
-
- When the Master series came on the scene, a special version was written in
- 128 BASIC to utilise the extra memory available in this mode. Overlays were
- no longer used, partly because the extra capacity gained was less
- significant and partly because disc access speed was slower in 128 BASIC.
-
- MAXIFILE-3 is the third version of the program, totally rewritten in BASIC V
- for the Archimedes and A3000 machines. The link between the three versions
- however remains, in that files are all stored in identical format so that,
- memory permitting, any MAXIFILE data can be accessed by any version on any
- machine.
-
-
- Special Features of MAXIFILE-3
-
- The vastly increased capacity of the new machines has altered the whole
- concept of database size. For a 1Mb machine, the restriction is now much
- more likely to be the capacity of your disc than the capacity of the
- computer. The principle of all records held in RAM is still followed, so
- beware of creating larger files than you really need - it still takes time
- to load and save to disc!
-
- Apart from increased file size, the following features are new:
-
- 1) The ability to accept field sizes up to 255 characters long.
- 2) The ability to create and save sub-files.
- 3) Improved search routines for creating sub-files.
- 4) All printout dated.
- 5) Simpler alteration of fields.
- 6) Provision to change discs to load or save.
- 7) Extensive use of mouse as an alternative to keyboard input.
- 8) Enhanced visual presentation.
-
- The program itself has been entirely rewritten from scratch, enabling new
- features of BASIC V to be used to the full. While all the original features
- are still available, some occur in different ways, and some include other
- minor improvements to make them that little bit more useful.
-
- A particular advantage of BASIC V is that with new commands like IF...THEN,
- there is less need to jump off into minor procedures, with the result that
- the structure of the program is easier to follow. The result is that it
- becomes easier than ever to add to or modify the program to taste. Provision
- was made for a routine to allow more than one page of data per record, but
- this has yet to be written - any offers?! It is also still short of most
- databases in not allowing for arithmetical calculations on fields, nor is it
- written to take advantage of RISC-OS. Nevertheless it will hopefully prove
- to be eminently usable and useful in the MAXIFILE tradition!
-
-
-
-
- - 1 -
-
-
-
-
- Maxifile-3
-
- Using MAXIFILE-3
-
- Getting started - the Introductory Screen
-
- The programme can be started using SHIFT-BREAK, or by entering BASIC and
- CHAINing MAXIFILE3. The introductory screen offers three options: to open an
- existing file, to create a new file, or to quit. Quitting at this stage
- would be cowardly, but if you must, then choose 3!
-
- Open an Existing File
-
- This will immediately mount the disc in drive 0, and display the contents of
- the datafiles directory. Note that it is assumed that there will be a
- directory $.DATAFILES on the disc, and if you are not using a disc already
- prepared for use with MAXIFILE-3 then you should set one up before you go
- any further.
-
- Enter the name of the file you wish to load. If it is not the correct disc,
- then press RETURN, insert the correct disc, press any key, and the process
- repeats.
-
- On entering the correct name, the file will load, and you will be presented
- with the Main Menu screen.
-
- Create a New File
-
- Enter the number of fields that you will need. This must be accurate since
- you will not be able to change it subsequently. You are however given the
- opportunity to change any errors in the next part, which is to enter the
- names and lengths of these fields. Note that field lengths cannot exceed 255
- characters, and the program automatically reduces any over-ambitious entries
- to this limit!
-
- After the details have been entered the computer will give you a rough guide
- as to the maximum number of records it can handle. It should be emphasised
- that it is very rough, based on using 90% of available memory. It is likely
- that you could get away with using more, but remember that your file has to
- be saved on disc which at most only takes 800k. If you are using a machine
- with 2Mb or more, you should drastically reduce the recommended maximum.
- Remember also that a large file takes a longer time to load or save, and so
- you should not set a size beyond your likely needs.
-
- You are now presented with the Main Menu screen.
-
- The Main Menu Screen
-
- This menu could be called the File Menu, since it deals only with those
- functions relating to the file or sub-file alone. Thus you may wish to view
- a file, save it or print it; all other activities within the database are
- record or field related. The Main Menu therefore only gives you four
- choices: to view, to save, to print or to quit.
-
- View Records
-
- This option leads you to the main record screen. As this contains most of
- the important features it is described fully in the next section of these
- notes. Briefly, you can browse through the records by using 1 for forward or
- 2 for back, or click the select button on these boxes. If you hesitate to
-
- - 2 -
-
-
-
-
- Maxifile-3
-
- try the other buttons before reading the appropriate section, then press 0,
- or click on the Main Menu button, to return back to the Main menu.
-
- Save File or Sub-File
-
- Whether it will save the mainfile or the sub-file will depend on which Index
- you are in. You start off in Index 0 which is always the original file.
- Moving into a sub-file can only be done from the Record Screen, but whenever
- you exit from the Record screen you remain in whichever file you were at
- that time, or in the new sub-file if you have just selected a new one.
- Sub-files are listed as either Index 1 or Index 2.
-
- Thus the save routine will apply to the current Index, and will operate in
- the same way without regard to which file you are in. The program asks you
- for the name to be used, and you can press RETURN to use the same name as
- before. However beware! Don't over-write your main file with a sub-file!
-
- You are also given the option of saving only part of the file by specifying
- the first and last records to be saved. This facility could be important
- when saving a sub-file. The main-file might be very large, and you may be
- limited on disc space. Therefore to save the sub-file with relatively few
- records as a smaller file could be essential. A sub-file is usually going to
- be much smaller than the main file, but the defaults have to assume you want
- it to be the same size.
-
- A sub-file is saved just as though it was a normal MAXIFILE datafile, and it
- can therefore be reloaded as the main file, or can be loaded into other
- earlier versions of MAXIFILE provided it is not too large.
-
- It is important to remember that MAXIFILE-3 will save the blank records
- (filled with asterisks) as well as the valid records. This is to ensure that
- sufficient space is kept on the disc for future expansion of the file. As a
- result, a large file will take longer to save. On the other hand, when
- loading, MAXIFILE-3 will only load valid records, and will not waste time
- loading blanks.
-
- There is however a catch to this, namely that if you allow any blank records
- to occur between valid records, the whole file will be saved, but the
- complete file will not be loaded subsequently. In normal use this problem
- should not arise because the program is written to try to ensure that any
- blanks are put at the end of the file. However it can happen if you choose
- to alter a blank record that does not immediately follow the last valid
- record. If in doubt, SORT the file before saving.
-
- Print File or Sub-File
-
- As with the saving routines, the print routine will apply only to the
- current Index. Users of previous versions of MAXIFILE will notice an
- important difference here because there are no longer special search
- routines included in the Print section. This is because you can create
- sub-files instead, and if you wish to access only particular records then
- you should create the appropriate sub-file first, and then print that.
-
- The print routine does however enable you to select which fields you wish to
- include, and in which order. Their selection should be easy to understand.
- The select button on the mouse can be used rather than the letter keys, and
- you can use RETURN rather than the 'No more fields' option.
-
-
- - 3 -
-
-
-
-
- Maxifile-3
-
- The layout of the hardcopy is automatic, and depends on whether it will fit
- in columns or not. If you have a long file that does not fit across the
- page, then you might use less paper if you select fields to fit and do more
- than one run! A number of printer codes are included in the print routine,
- and are all Epson codes. If you have a printer than does not conform to
- Epson codes then you will need to do some alterations. Codes used include
- underline, elite, condensed and italics.
-
- Where possible the printout is in columns, in the largest print size that
- will fit. If it will not fit in condensed, then printout is in pica (10
- ch/in), and fields are printed line by line. This is obviously more costly
- in terms of paper, taking a minimum of two lines for every field of every
- record.
-
- You may choose the range of records to be printed, defaults being the whole
- file. The printout is either headed or tailed with the day and date, the
- name of the file and the index number, and the number of records listed.
-
-
- The Record Screen
-
- This is the heart of MAXIFILE-3 where all alterations, additions, deletions,
- selections, sorts and searches take place. There are 10 choice boxes, plus
- additional features selected using the mouse. At the top of the screen the
- filename appears, the maximum number of records the file is set up to hold,
- and the current Index number. The record number also appears top right.
-
- Next
-
- Simply click select on this box, or press '1' (or even press SPACE) to
- display the next record in the file. If you do so while viewing the last
- record then you will return to the Main Menu.
-
- Last
-
- Select with the mouse or press '2' to go back to the previous record.
-
- Delete
-
- If you are in Index 0 (i.e. the main file) then this routine will delete the
- record entirely, although the record will not of course be lost on disc
- until you save the revised file. If you are in a sub-file then the record is
- deleted from the sub-file only.
-
-
-
- Insert
-
- You can only add new records if you are in Index 0. The program makes space
- for a new record to immediately follow the record you had been viewing. If
- by so doing it would lose the last record in the file you will be warned and
- given the option to abort the insert routine. The new record is then
- presented as a blank record on screen - i.e. made up of asterisks - and you
- must then select the Alter box (explained below) to enter details in the
- fields. This is important because if the first record is left with a leading
- asterisk, then data could be lost after saving. (See the note on saving on
- page 3 for further explanation.)
-
-
- - 4 -
-
-
-
-
- Maxifile-3
-
- Main File
-
- DO NOT CONFUSE THIS with Main Menu! This enables you to move up a level in
- the Indices. Thus if you are in Index 1, this will move you back to the Main
- File which is Index 0. If you are in Index 2 then you will move to Index 1.
- Whatever index applies, you will be returned to the Main Menu after
- selecting this choice, but remember you are now in a higher index than
- before (unless of course you were already in 0!). The opposite of this
- selection can only be achieved by using the menu button on the mouse.
-
- Sub File
-
- This is not the true reverse of main File because it automatically assumes
- you wish to set up a new sub-file. NB: Once you have selected this option,
- you have lost your previous subfile at the next lower level if if previously
- existed.
-
- It may help to understand how this part of the program is devised. You are
- given an opportunity to set two conditions, but each condition is set up
- separately, and only then do you tell the program how you wish to combine
- them. You do not have to set both conditions, and the program deals with the
- first condition completely before it asks if you want to set a second
- condition.
-
- To set up a condition you must first identify the field it relates to, and
- then the string within that field with which a comparison will be made. You
- may then require the field in each record to be greater than or less than
- the chosen string, to contain the chosen string, or to exclude the chosen
- string. Following this choice you are then asked if you want to impose a
- second condition.
-
- If you choose a second condition then it is set in exactly the same way as
- for the first, but having set up the condition you are then asked how you
- wish to combine them. The first option is to combine the two conditions so
- that all the selected records of both operations are combined together - the
- Inclusive Or. The second 'Not Both' is the Exclusive Or - Condition A or
- Condition B but not any records that are included in both. Only both is the
- logical AND, and sets up the sub-file with records that satisfy both
- conditions. If you are familiar with set theory a venn diagram may help!
-
- This method of creating a sub-file should enable all two-condition tests to
- be satisfied. If you need to impose a third condition, then set up a
- sub-file of the sub-file - this is what Index 2 is there for.
-
- Sort
-
- This routine enables you to make a primary sort on one field, and a
- secondary sort on a second field if required. You may sort in ascending or
- descending order. The coding is based on a simple bubble sort, but on the
- Archimedes this still gives an acceptable speed for most purposes. Note that
- the sort only applies to the current Index.
-
- Go To - Including Replace
-
- At its simplest you select 'Number of Record Required' and enter the number
- of the next record you wish to view. This is particularly useful to move
- about quickly in a large database rather than going through one at a time.
-
-
- - 5 -
-
-
-
-
- Maxifile-3
-
- The 'Field search' option has two purposes. You can use it simply to reach
- the first record with the field containing the chosen string by selecting
- 'View' - but that is all it does. Remember that this is essentially a 'go
- to' routine, but if you want ALL the records that contain the string you can
- set up an appropriate sub-file.
-
- There is however a much more important replace option linked to Field search
- which will replace all occurrences of the chosen string with a specified
- second string.
-
- Print
-
- This enables you to obtain a printout of the record currently displayed. No
- choices are given, and it always prints in block rather than column format,
- but it does date the printout and record the file name and record number.
-
- Main Menu
-
- Self-explnatory, really!
-
- Alter record
-
- This is only selected using the SELECT mouse button on the black box close
- to the top of the screen. It is however the main method of entering new
- data, and it expects you to enter information consecutively into each field
- in turn. At the start the first field is hilighted and the length of the
- field is picked out by a white line. If you type beyond this, the entry will
- be truncated to the maximum length. When you press return, you will
- automatically move to the next field, and so on until all fields are
- completed. If a field already contains correct information, pressing return
- on its own will restore the original contents.
-
- Alter a Field
-
- Fine adjustment or the complete replacement of just one field could be done
- using the Alter Record routine, but this is not always convenient. You may
- for example wish to keep on screen the existing field contents and just
- modify them slightly. To do this press the ADJUST button on the mouse
- against the field name. The name will change colour, and a correction window
- appears at the top of the screen containing the field contents.
-
- You can alter the contents of the window using the cursor keys to position
- the cursor, or using SELECT on the mouse to position the cursor where you
- need it. If the field is too long to fit in this window, then you must use
- the cursor keys to move the hidden part into view. At the cursor you may
- type in new text (which pushes old text to the right, but may loose the end
- of the contents that no longer fit within the field length), use DELETE to
- delete left, use COPY to delete right (i.e. above the cursor), CTRL-U to
- delete the whole field content, or ESCAPE if you decide to abandon the
- correction! RETURN however will replace the field content with the revised
- entry.
-
- Move into an existing Sub-File
-
- Use the MENU button on the mouse to select the next Index down, assuming
- that it has already been defined. This will return you to the Main Menu, but
- in the new Index.
-
-
- - 6 -
-
-
-
-
- Maxifile-3
-
-
- Improvements
-
- No software is complete, and there are several enhancements that could be
- made to this program. Some are listed below. Offers to write the appropriate
- routines would be welcomed!
-
- I would like to include some arithmetic facilities, chiefly an average
- routine and a total routine.
-
- There should be a routine to add extra fields, or to delete fields -
- particularly from sub-files.
-
- Other routines to convert data into an InterWord file which can then be used
- for mail merging (on Masters and Compacts, anyway) already exist. A routine
- could be written however to at least print envelopes!
-
- How about providing alternative layouts of the Record Screen? Possibly not
- showing all fields? A constraint here is the file storage format on disc
- which has deliberately been kept compatible with earlier versions, but
- screen formats could possibly be saved separately.
-
- Print formats designed on screen.
-
- This is not a RISC-OS program - will MAXIFILE-4 be the next step? Not unless
- there are more rainy days than usual, or someone writes it for me!
-
-
-
-
- CALW
- April 1990
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 7 -
-
-
-
-