home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-27 | 54.7 KB | 1,560 lines |
-
- QuickFile v2.01 18 November 1993 by Alan Wigginton
-
- ========= CONDITIONS OF USE ===========
-
- QuickFile is not Public Domain, however it can be freely distributed
- provided all documentation and sample files are included unchanged. This
- version is fully functional, except that the 'About QuickFile' requester
- will be frequently displayed to remind you that it is unregistered.
-
- I accept no liability for any loss or damage resulting from the use of
- this program. Users must evaluate the program and decide its usefulness
- for their own purposes.
-
- If you continue to use this program for more than one month, you should
- send $30 registration fee to:
-
- Alan Wigginton
- 23 Carissa St
- Shailer Park, Queensland 4128.
- AUSTRALIA
-
- Overseas users - please do not send personal cheques. Please send either
- an international money order or an overseas bank draft in Australian
- Dollars drawn on an Australian bank. Any cash currency is also OK, however
- sending cash through the mail is at your risk.
-
- I intend to develop the program further if enough interest is shown and
- would appreciate any constructive comments you may have, even if you
- decide not to register. Enclosing a stamped self addressed envelope will
- ensure a personal reply.
-
- ====== Benefits of Registration =============
-
- Registration will entitle you to:
-
- - A registered copy of the latest version of the program with the
- about requester display removed.
- - Free support and advice - slow mail only I'm afraid
- (You are welcome to phone providing you pay the call charges)
- - Upgrades to future versions for a nominal cost.
-
- Registration will also encourage me to continue to develop the program.
-
- Please include the version number (from the about requester) of your
- copy. I would also be interested to know:
-
- - Where you obtained your copy of the program
- - Your system configuration. Model, memory etc.
- - What you are using the program for.
-
-
- ========== COPYRIGHT NOTICES ============
-
- Quickfile copyright 1992, 1993 by Alan Wigginton
-
- I accept no liability for any loss or damage resulting from the use of
- this program. Users must evaluate the program and decide its usefulness
- for their own purposes.
-
-
-
- AmigaGuide, AmigaGuide.info, amigaguide.library, WDisplay, WDisplay.info
- (c) Copyright 1991-1993 Commodore-Amiga, Inc. All Rights Reserved.
- Reproduced and distributed under license from Commodore.
-
- AMIGAGUIDE SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
- NO WARRANTIES ARE MADE. ALL USE IS AT YOUR OWN RISK. NO LIABILITY OR
- RESPONSIBILITY IS ASSUMED.
-
-
- =========== PROGRAM DESCRIPTION =================
-
- QuickFile is simple but flexible, flat file database. It uses random
- access, with indexes for fast access to records. Files can be larger than
- available ram, but as much of the file as possible is kept in ram to
- reduce disk accesses. Features include:
-
- - Multiple indexes that are automatically maintained.
- - Character, date, integer and floating point data types
- - Up to 250 characters per field and 250 fields per record.
- - Form and list style displays and reports.
- - Unlimited number of views of each file.
- - Fast sorting with multiple sort keys supported
- - Search operators include Like, Equal, Between, Sounds Like, Not Like
- and Not Equal.
- - Fields can be added, changed, or deleted at any time.
- - Flexible export/import
- - Flexible multi column label printing.
- - Runs on WB1.3 or later and should be OK with 512K ram.
-
- QuickFile is written in C and compiled with NorthC (Fish 384) from Steve
- Hawtin. Thanks for your efforts Steve.
-
-
- ============ QUICK START ============
-
- WARNING. QuickFile is a random access data base that buffers records in
- memory. Failure to exit the program properly after updates are
- made will result in lost updates.
- ALWAYS exit the program before a reboot or power off.
- DO backup your files regularly. When backing up a database, make
- sure you backup all files - definition, data and indexes.
-
- It is strongly suggested that you copy QuickFile to a work disk before you
- try adding or updating records. The easiest way to do this is to drag the
- QuickFile drawer into another disk window.
-
- Use the QFDefine program to define a new database or change an existing
- file definition. Use the QuickFile program for all other functions.
-
- The current view determines the display and print format.
-
- The current index determines the sequence for displays and reports.
-
- Sorting and Selecting create temporary indexes which are available until
- you close the file or explicitly drop them.
-
- Two demonstration databases are provided. Click on one of these icons to
- start Quickfile and display the first record in the file.
-
- It is a good idea to browse through this document to get a feel for the
- program before trying to do too much.
-
- I recommend that you place each database in a separate drawer (directory)
- as a number of index and view files for different databases can be
- confusing. This also makes it easy to backup the database by simply
- dragging the drawer to a backup disk.
-
-
- ========= STARTING THE PROGRAM ===========
-
- Starting from Workbench
-
- QuickFile can be started from the WorkBench using the QuickFile icon or a
- project icon for a data base.
-
- If you start QuickFile from a project, the file is opened and the first
- record is displayed.
-
- If you start it from the program icon, a file requester is displayed for
- you to select the file you want to open.
-
- Icons are not generated by the program. Sorry, but if you want them you
- will have to create them yourself.
-
-
- Starting from the Shell or CLI"
-
- To start QuickFile from the CLI, type the program name followed by a file
- name (optional) as a parameter. For example
-
- QuickFile [data:addressbook]
-
- If you include a filename, the file is opened and the first record is
- displayed.
-
- If you do not give a file name, a file requester is displayed for you to
- select the file you want to open.
-
-
- =========== FILE REQUESTERS =============
-
- QuickFile supports the following file requesters (in order of preference):
-
- The ASL requester (WB2) will be used if asl.library is in your
- LIBS: directory.
-
- The ARP requester will be used if arp.library is in your LIBS:
- directory.
-
- If you have neither, QuickFile will use a requester with simple
- string gadgets for you to enter Drawer and File names.
-
- This file requester will be used whenever a file name is required.
-
-
- =========== MAIN WINDOW ===============
-
- The main window title bar is used to display a status line and status
- messages.
-
- The status line contains. the name of the current view, the name of the
- current index, the current record number and the total number of records.
-
- A row of buttons is displayed across the bottom of the window to control
- frequently used functions.
-
- Remaining functions are accessed via Menus.
-
- The vertical scroll bar on the right hand side is used to move from record
- to record through the file.
-
- The horizontal scroll bar at the bottom is used to display additional
- fields that do not fit in the window. This usage is the same for both form
- and list displays.
-
-
- ========== INDEXES =================
-
- QuickFile uses indexes to sequence the records and to provide rapid access
- by key field value.
-
- Searching an index is much faster than searching the whole file. Any
- record out of thousands can be located in seconds - under 1 second if the
- file is completely in ram, longer if records have to be retrieved from a
- floppy.
-
- Each data base must have at least one index, and you can have a number of
- indexes, all of which are automatically maintained as you add, change and
- delete records.
-
- The current index name is displayed in the title line. If other indexes
- are available you can choose them with Indexes item on the View menu.
-
- Indexing has some overheads, but with QuickFile these are quite small. The
- downside is that its capacity is limited to relatively small files (like
- 10,000 to 20,000 records).
-
-
- =========== RANDOM ACCESS ===============
-
- Random access means locating a record in a file directly using its offset
- from the start of the file, instead of reading sequentially through the
- file record by record until you find the one you want.
-
- This means you don't have to read and write all of the file if you only
- want to update one record.
-
- Random access is generally only a useful technique when combined with
- indexing. Without indexing you have to supply the number of the record you
- want, which isn't particularly useful.
-
-
- ============ ABOUT VIEWS =============
-
- Views allow you to display data from a file in different ways. There are
- two basic types FORM and LIST.
-
- A view may display only some of the fields from the file, and it may only
- show part of some fields.
-
- Each view has its own field titles, positions and lengths, window size and
- report details. Once you have a view set out the way you want it, you can
- save it for future use.
-
- The Define View requester is used to select or change the fields included
- in a view. The positions of fields on a form can be changed by dragging
- them around with the mouse.
-
- When you open a file, QuickFile looks for a view called filename.VIEW and
- loads it. If it doesn't find it, it creates a default view in ram. To use
- your favourite view automatically, save it as filename.VIEW. A View is only
- saved if you explicitly save it, otherwise any changes to a view will be
- lost when you exit the program.
-
- If you want to keep things simple and are happy with the default view, you
- need not define a view at all.
-
- Views are typically used to print labels, export or import selected fields
- or print lists containing only selected fields.
-
-
- ============= EDITING KEYS ==============
-
- Standard Amiga text gadgets are used for entering data. These provide the
- following editing keys:
-
- right Amiga-X Erase all text in the gadget (as does Control-X)
- right Amiga-Q Restores the text that was present before you
- changed it.
- Shift-left arrow Moves the cursor to the beginning of the field.
- Shift-right arrow Moves the cursor to the end of the field.
- Shift-Del Erases all characters from the cursor to the end of
- the gadget.
- Shift-Backspace Erases all characters to the left of the cursor.
-
- The ENTER key will normally move the cursor to the next field on the
- screen. If pressed on the last field, it will wrap around to the first
- field.
-
-
- ============== CHANGES SINCE VERSION 1.3 ==============
-
- - Now able to define views that can be saved and reloaded. Views specify
- field title, position and length, window sizes and report details.
-
- - Position fields on the FORM display by dragging with the mouse.
-
- - Multi column label printing
-
- - Vastly improved searching
-
- - Descending as well as ascending order for sorting and indexing
-
- - Many minor improvements and bug fixes.
-
- - Preset export formats added and improved flexibility provided for
- custom formats.
-
- ================ FORM DISPLAY =====================
-
- The FORM DISPLAY shows a single record per screen in the format specified
- by the current view.
-
- This can display all details for a record. If there are more fields in the
- view than will fit in the window, the horizontal slider can be used to
- scroll the display.
-
- The LIST button can be used to quickly change to a list display with the
- current view.
-
- Field positions can be changed by dragging fields around the window with
- the mouse. Note that the program does not stop you from positioning fields
- on top of other fields. This does no harm, but it does look odd.
-
- To add or delete fields, change field titles or displayed lengths, press
- the VIEW button;
-
-
- ============== LIST DISPLAY ==================
-
- The LIST display shows as many records as will fit in the window with a
- single line per record.
-
- This allows you to display records in the context of the records before and
- after it.
-
- If the records are wider than the window, the horizontal slider can be used
- to scroll left or right.
-
- To update a record double click on it with the left mouse button
-
- Before using the Modify or Delete buttons, select a record using a single
- press of the left mouse button.
-
- If You use the Modify without a record selected, the first record on the
- screen will be displayed for modification.
-
- If you use the Delete button without selecting a record, you will get an
- error message.
-
-
- ================ MAIN REQUESTERS ====================
-
- Define View Requester
-
- The view requester is displayed when you select an option to define or
- change a view. If you selected New View, a new view called 'Unnamed' is
- displayed.
-
- To change an existing view you press the VIEW button, or select VIEWS from
- the VIEW menu, highlight the view you want to change, then press the ALTER
- button.
-
- The Define View requester contains the following elements
-
- Name
- This name identifies the view and is displayed in the view selection
- list. The current view name is also displayed in the window title bar.
-
- Available Fields List
- This is a list of the fields in the current file. Clicking on a field
- will add it to the current view.
-
- Selected Fields List
- This is a list of the fields in the current view. Clicking on a field in
- this list will select it and display its name and length below the list
- box. These can then be changed if required. The changes will only affect
- the current view.
-
- If a field is highlighted, new fields will be added before the high-
- lighted field, otherwise new fields will be added at the end of the
- list. To remove highlighting click in the blank part of the box.
-
- Type Button
- This button toggles between Form and List to select the basic view type.
-
- Field Names Button
- This turns the display of field names on and off. Field names are
- normally only turned off for printing labels.
-
- Field Title String Gadget
- You use this to change the field title for this view only. This is useful
- for having a short title for a short field in the list display. The title
- can be blank. This gadget is disabled unless one of the selected fields
- is highlighted.
-
- Length String Gadget
- Changing this length allows you to have a display length different to the
- file length. This can be useful for reducing field lengths on a list
- display to fit in more fields. It can also be used to print an initial
- instead of a first name on a mailing label. This gadget is disabled
- unless one of the selected fields is highlighted.
-
- IMPORTANT NOTE: You must press enter after changing either the field name
- or length or your changes will be ignored.
-
- Delete
- The delete button will delete the highlighted field from the selected
- fields list. No confirmation is asked - it is deleted immediately. This
- gadget is disabled unless one of the selected fields is highlighted.
-
- OK Button
- Accepts the new or changed view
-
- Cancel
- Cancels any changes you have made.
-
-
-
- === Define Index Requester ===
-
- The Define Index requester is displayed when you are adding or changing an
- an index. A similar requester is used for defining a sort key.
-
- It contains the following elements
-
- Name
- This name identifies the index and is displayed in the index selection
- list and in the window title bar when the index is active. It is also
- used to form the file name for the index.
-
- Available Fields
- This is a list of the fields defined in this file. Clicking on a field
- will add it to the fields selected for this index.
-
- Selected Fields
- This is a list of the fields in the current index. The order of the
- fields in this box determines their priority in the sort. The first field
- is the primary key, the second will only be used for records where the
- first keys are equal and so on.
-
- Clicking on a field in this list will select it and display its name
- and length below the list box.
-
- If a field is highlighted, any new fields will be added before the
- highlighted field, otherwise new fields will be added at the end. To
- remove highlighting click in the blank part of the box.
-
- Length
- Changing this length allows you to index on part of a long field.
-
- IMPORTANT: YOU MUST PRESS ENTER OR RETURN AFTER CHANGING A LENGTH OR
- YOUR CHANGES WILL BE IGNORED
-
- Order
- This toggles between A..Z and Z..A to select whether the index is to be
- sorted into ascending or descending order.
-
- Delete
- The delete button will delete the highlighted field from the selected
- fields list. No confirmation is asked - it is deleted immediately.
-
- OK Button
- Accepts the new or changed index
-
- Cancel
- Cancels any changes you have made.
-
-
-
- ============== MAIN WINDOW GADGETS =================
-
-
- GoTo Button
-
- GoTo finds a record by key value using the current index. This makes
- access extremely fast, even on large files.
-
- Only The key fields for the current index are displayed.
-
- You only need to enter enough of the key to identify the record you
- want, but you must start at the beginning of the key - if you enter
- only the second key field, you will go to the start of the file.
-
- Press RETURN on the last key field or click on the OK button to
- perform the GoTo.
-
- If the key you enter does not exist, the followin record is displayed.
- You can enter "SM" to position on the record for SMITH, which will be
- followed by SMITHERS, SMITHFIELD etc.
-
-
- Insert Button
-
- Pressing the INSERT button displays a blank form for you to enter
- values for a new record. Press RETURN on each field to move you to the
- next field.
-
- Press the Copy button to copy the contents of the last record
- displayed or added. This is useful if you are entering records with
- similar values in some fields of each record. Warning - it replaces
- anything you have keyed.
-
- Press Insert to store the details and clear the fields ready for the
- next record.
-
- Press Cancel to return to Browse mode. NB When Cancel is pressed any
- values displayed on the screen will be lost. Press Insert to insert
- the record, then Cancel.
-
- You cannot insert a record that is completely blank.
-
- The vertical scroll gadget is disabled while you are in insert mode.
-
- The horizontal scroll gadget can be used to scroll the display and
- access fields that do not fit in the window.
-
- Modify Button
-
- Pressing the MODIFY button displays the current record for you to make
- changes.
-
- Press RETURN to move to the next field.
-
- Press the Update button to store the changes.
-
- Press the Cancel button to keep the current values.
-
- The vertical scroll gadget is disabled while you are in insert mode.
-
- The horizontal scroll gadget can be used to scroll the display and
- access fields that do not fit in the window.
-
-
- Delete Button
-
- Pressing the DELETE button displays a requester asking you to confirm
- the deletion.
-
- Press OK to delete the record.
-
- Press Cancel if you really want to keep it.
-
- Once the record has been deleted you cannot get it back.
-
-
- List/Form Button
-
- The LIST button is displayed on the Form screen. It will change the
- view to a List view.
-
- This is the same as selecting Views from the View menu, pressing the
- Alter button and changing the type to List.
-
- The FORM button is displayed on the List screen. It will change the
- view to a Form view.
-
- This is the same as selecting Views from the View menu, pressing the
- Alter button and changing the type to Form.
-
- View Button
-
- Pressing the VIEW button displays the Define View requester showing
- the current view ready for your changes.
-
- This is a shortcut for selecting the View menu item, selecting a view
- and pressing the Alter button.
-
-
- Slider Gadgets
-
- Scrolling is controlled by two slider type gadgets.
-
- Vertical Slider
-
- This controls movement through the file and works in the usual way.
- Press the arrows to move one record at a time.
- Click in the box to move one page at a time - for the form display this
- is also one record at a time.
- Drag the knob to move as far as you like.
-
-
- Horizontal Slider
-
- If there are more fields than will fit in the current window, this
- can be used to display the next group of fields. This works the same as
- the vertical slider except that there are no arrows.
-
-
- ============= MENUS ======================
-
- Project - Open
-
- Selecting the OPEN menu item brings up a file requester for you to
- select the file to process.
-
- Always select the definition name - the one with no extension.
-
- If you select a file that is not a QuickFile definition, you will be
- given a message saying that the definition cannot be found.
-
-
- Project - Save
-
- Selecting the SAVE menu item writes all updated blocks and indexes to
- disk. You should use this periodically during a long update session.
-
-
- Project - Close
-
- Selecting the CLOSE menu item writes all updated records and indexes
- to disk and closes the file but leaves the program running so you can
- open another file.
-
-
- Project - Save As
-
- Selecting the SAVE AS menu item creates a new file from the currently
- open file. If the current index is a selection, only the selected
- records are written to the new file.
-
- A file requester is displayed for you to enter the new file name. It
- is best to create this in a different drawer.
-
- The new file is reorganised as it is written. Indexes for the new file
- are not created - they will be built when you first open the new file.
-
- When the file has been created, a requester is displayed to ask if you
- want to open the newly created file or continue with the file
- currently open.
-
- Project - Reorganise
-
- This reorganises a file by creating a new reorganised version and then
- copying that version over the original file.
-
- Reorganising is not essential, but if you have been doing many
- additions and deletions, it may reduce file size and will improve
- performance.
-
- During reorganisation free space is adjusted to the value specified in
- the file definition and records are physically stored in the sequence
- of the active key. Select your most used key sequence before
- reorganising to optimise access with that key.
-
- You are not allowed to reorganise using a selection of records.
-
- The file requester will be displayed for you to enter a name for the
- work file required. This should be in a different drawer to the main
- file. It is not automatically deleted and may be kept as a back up if
- you like.
-
-
- Project - Exit
-
- Selecting the EXIT menu item writes all updated records and indexes to
- disk, closes the file and exits the program.
-
- Selecting the Close gadget on the screen has the same effect.
-
- A requester is displayed to confirm your choice.
-
- Note that you do not have the option of exiting the program without
- saving the file. This is because records may be written back to the
- file any time while you are running the program.
-
-
- View - Indexes
-
- Choosing the INDEXES menu item displays a requester showing a list of
- indexes for you to choose from. If you have performed a sort or
- selection, the list will include "Selected" and/or "Sorted".
-
- Double click on an index to use it, or click once to select it.
-
- When you change indexes, the same record is displayed but the file
- will be in a new sequence. e.g. You can use this to find a book by a
- particular author, then select the subject index to list all other
- books on the same subject.
-
- Pressing the Drop Button removes the selected index from memory and
- frees the space used. You can only drop the Selected or Sorted
- indexes. To remove any permanent index use the QFDefine program.
-
-
- View - Views
-
- Selecting the VIEWS menu item displays a requester showing a list of
- views for you to choose from. If you have not created or loaded any
- views, you will have a single view called filename.VIEW.
-
- Double click on a view to use it, or click once to select it.
-
- Press the Alter button to bring up the Define View Requester to change
- the view.
-
- Press the Drop button to drop the selected view. You cannot drop the
- last view - you must have at least one loaded.
-
-
- View - New View
-
- Selecting the NEW VIEW menu item creates a new view called 'unnamed'
- and displays it in the Define View requester.
-
-
- View - Load View
-
- Selecting the LOAD VIEW menu item brings up a file requester for you
- to select a view to load.
-
- When you load a view, it becomes the current view and the display will
- change accordingly.
-
- If fields have been deleted from the file definition, they will be
- automatically dropped from the view.
-
- If field names have been changed or new fields added, they will appear
- at the end of the view.
-
- The fields in the view and the file definition are associated by name.
- If you load a view from another file, it will display only those
- fields that are the same in both files.
-
- View - Save View As
-
- Brings up a file requester for you to enter the file name for the
- view. The current view name is displayed as a default.
-
- The default view for a file is named filename.VIEW, but a view can
- have any name.
-
- Note that you are not reminded to save a changed view before you close
- a file.
-
-
- Tools - Sort
-
- The Sort Requester is very similar to the index requester as a sort
- effectively creates a temporary index that is updated automatically as
- you add, delete and change records. The Sort index is discarded when
- the file is closed, but until then you will not need to re-sort to
- place changed or new records in the right sequence.
-
- See the Index Requester for details on specifying the sequence.
-
- If you request a sort while displaying selected records, only the
- records in the selection are sorted.
-
- Date, integer and number fields are sorted correctly according to
- their value, rather than their ASCII sequence.
-
- You can sort over as many fields as you like with a single sort.
-
- Press OK to start the sort, or Cancel if you have changed your mind.
- Sorting is quite fast so you shouldn't have to wait long. A sort (over
- one field) of the 1300 records on my largest file takes 22 seconds on
- my standard A500.
-
- The sort technique used requires that all sort keys be resident in
- memory, so record buffers are freed to increase the memory available
- to the sort. You will notice that disk activity increases after a sort
- as buffers are reloaded. If you are short of memory, it may help to
- sort using less than the full length of long fields.
-
-
- Tools - Select
-
- A selection is a sub-set of the data base that matches specified
- conditions. QuickFile searches through the whole data base looking for
- records with fields matching requested values, and creates an index
- containing these records. You can then browse, print, export or backup
- the selected records.
-
- The selection is updated automatically for deletions and changes but
- not additions. Records you add to the data base will not be added to
- the selection.
-
- When displaying a selection, the title bar will show the number of
- records selected. Don't panic, you haven't lost your file. The full
- number will be displayed when you choose a full index again.
-
- The selected data will be in the same sequence as the current Index.
- You can sort it into another sequence if required. If the current
- index is the result of a previous selection, only the selected records
- are searched, which is much faster than searching the full file.
-
- You can use any number of criteria for a search, but the more you have
- the slower the search will be.
-
- Two values can be specified for each item. The second value is
- primarily for the Between operator, but it can be used to specify an
- alternative value for the other operators.
-
-
- Search Panel
-
- The Search Panel displays a list of search criteria with buttons for
- inserting, modifying and deleting them.
-
- Clicking on the Insert or Modify will display the Search Details
- requester for you to insert or modify the details.
-
- For insertions, if an item is selected, the new item will be inserted
- before the selected item, otherwise it will be inserted at the end of
- the list.
-
- Clicking on delete will bring up a requester for you to confirm the
- deletion of the selected item.
-
- Search criteria linked with 'and' will select only records that match
- all criteria, while search criteria linked with 'or' will select
- records that match either criteria.
-
- 'And' has higher precedence so criteria are formed into groups split
- by 'or'. All criteria in a group must be satisfied for a record to be
- selected, but a record will be selected if it matches any group. That
- is confusing and is probably best explained with an example:
-
- Occupation equal programmer
- and location equal sydney
- or Occupation equal programmer
- and location equal canberra
-
- This will find all programmers who live in Sydney or Canberra. Note
- that Occupation had to be repeated. The following would give all
- programmers who live in Sydney and EVERBODY who lives in Canberra.
-
- Occupation equal programmer
- and location equal sydney
- or location equal canberra
-
- You can also do things like
-
- Name like john
- and Name notlike smith
-
- which would find all persons named John, except those named John
- Smith.
-
-
- The Search Details requester contains the following items:
-
- Connector Button (AND or OR)
- This toggles between AND and OR to specify how this search item is
- combined with the previous one. It has no effect for the first
- item.
-
- Available Fields List
- This lists all the fields in the file for you to select the field
- to search on. The current selection is displayed under the list.
-
- Comparison Operator
- This determines the operator to be used for this search item. See
- below for details,
-
- Value 1
- This is the primary search value. It is always used. If you want
- to search for empty fields leave this empty.
-
- Value 2
- This is the secondary search value. Its primary use is with the
- between operator but can be used to enter an second search value
- for the other operators.
-
- Note that with Not Equal and Not Like, value 1 and value 2 are
- joined by AND rather than OR. It will find all records except
- those that contain value 1 or value 2. Using OR in this situation
- would select every record.
-
-
- Search Operators
-
- The operators available for searching are:
-
- Like
- Matches fields that contain the search string anywhere within
- them. eg "bit" would find "The Hobbit" and "Bitter Sweet".
-
- Equal
- Matches a field only if it exactly equals the search value. Note
- that case is not significant so that dog will match Dog or even
- dOG.
-
- Between
- Matches a field with a value equal to or between the specified
- pair of values. This can also be used to perform a less than or
- greater than search. e.g. 'between 41 and 999' is the same as
- 'greater than 40'.
-
- Sounds Like
- Matches fields where the first word sounds like the search value.
- This is really a bit of a gimmick as it is not very smart. It uses
- a version of the old soundex technique which requires that you
- know the first character, and has a number of other limitations.
- It can be useful though. NOTE it only looks at the first word of
- the field.
-
- Please don't write and tell me that it doesn't work with such and
- such, unless you include a better (and compact) algorithm.
-
- Not Like
- As for like but will only match records that do not contain the
- search value.
-
- Not Equal
- As for equal but will only match records that are not equal to the
- search value.
-
-
-
- Tools - Rebuild Index
-
- Selecting the Rebuild Index menu item Rebuilds the current index from
- the data records.
-
- This can be used if the index and data files are inconsistent for some
- reason (eg a system failure). The index is rebuilt from the data file.
-
- Try using this if the program is failing with a 'Block not found
- message' or any messages to the effect that QuickFile could not find a
- record it looked for.
-
- Tools - Export
-
- Export Allows you to write all, or selected, records to an ASCII file
- for exchanging data with other applications such as word processors,
- other data bases etc.
-
- The order and length of the fields in the export file is determined by
- the current view. Before doing the export, you may need to create a
- new view to give the record layout you want.
-
- A requester is displayed for you to select the record format to be
- used. A number of preset formats (see below) are provided or you can
- tailor your own Record and field Separators by selecting the Custom
- format.
-
- The headers button determines whether a header record containing the
- field names is to be included at the start of the file.
-
- Pressing the OK Button displays a file requester is displayed for you
- to specify the name of the export file .
-
- All records from the currently selected index will be written. If you
- are displaying Selected records, only the selected records will be
- written.
-
- Preset Export/Import Formats"
-
- A number of preset formats are provided including the mailmerge formats
- for a number of wordprocessors. You can choose from:
-
- Custom
- This allows you to define your own format using predefined Separator
- characters.
-
- "...",
- This is a quote and comma delimited text file such as used for data for
- BASIC programs.
-
- The following preset formats are available only for Export, not Import.
-
- Final Copy
- Interword
- KindWords 3
- ProWrite
- WordWorth
-
- Only the KindWords 3 version has been tested. If you have a problem with
- any of them please send me a copy of the specification for the format
- and, if possible, a sample file that works.
-
- If you require a format that is not included, let me know as I should be
- able to include it very easily.
-
- Field and Record Delimiters
-
- The Custom delimiter buttons work like cycle gadgets in that the
- selection changes with each click. You can only select from the
- predefined delimiter codes.
-
- Field Start
- This is fairly obvious and is the character that marks the start of a
- field.
-
- Field End
- This marks the end of a field. It differs from the field separator in
- that a separator does not appear after the last field in a record
- while a field end character appears after every field.
-
- Field Separator
- This separates each field in the record. It does not appear after the
- last field in each record
-
- Record End
- Marks the end of each record
-
- If Field Start is used, a Field End must also be used. If neither Field
- End nor Field Separator is used, the records will be fixed length with
- each field padded to its maximum length with spaces.
-
- Example 1 "field1","field2"{LF}
-
- This is a fairly common text file format and is defined by
-
- Field Start = " (Quotation mark)
- Field End = " (Quotation mark)
- Field Sep = , (Comma)
- Record End = {LF} (Line Feed x'0A')
-
- Example 2 field1{TAB}field2{TAB}{LF}
-
- Field Start = None
- Field End = {TAB} (Tab character x'09')
- Field Sep = None
- Record End = {LF} (Line Feed x'0A')
-
- The available characters are:
-
- LF Line Feed. This is the standard Amiga end of line character.
-
- TAB Fields are separated by a TAB character.
-
- CRLF This is the MSDOS style end of line character; a carriage
- return followed by a line feed.
-
- NONE No character used
-
- ' Single quotation mark
-
- " Double quotation mark
-
- Do not use the same character as a field and record separator for
- import.
-
- If you have a choice, use TAB for field separator, and LF for record
- separator, or use the "...", preset.
-
-
- Tools - Import
-
- Import works in a similar way to Export, except records are loaded
- from an ASCII file into your data base.
-
- The sequence and length of fields in the input file are determined
- from the current view. You should create and select the view before
- selecting the import function.
-
- Both sequence and length can be different from that in the database.
- Also, not all database fields need to be present in the ASCII file.
- Any fields not present will be set to blank in your data base.
-
- Record and Field separators are the same as for export.
-
- NB: It is vital that the sequence and number of fields you set in the
- selected fields box of the field selector correspond to the sequence
- of fields in the ASCII file you are importing.
-
- Make you sure to backup your database before you import a file into an
- existing data base. If you get the format wrong, it is easier to
- restore than to fix or delete all of the incorrect records.
-
- Also use plenty of buffers if you are going to import a large number
- of records.
-
- Example:
-
- Data Base
- Surname 40
- First Names 40
- Street 30
- Suburb 30
- Postcode 10
- Date of Birth 11
-
- ASCII File record example
-
- "Alan","Wigginton"
- "William","Smith"
-
- This will work correctly provided you ensure that you set up a
- view in the sequence that they are in the ASCII file.
- The Import field selector should show the selected fields as:-
-
- First Name 40
- Surname 40
-
- This will load First Name and Surname to the correct fields in
- the data base and set the remaining fields to blank.
-
-
- Print - Print Displayed Records
-
- Prints the records currently displayed on the screen. This will be a
- single record for a form display.
-
- Print - Print all Records in Current Index
-
- Prints all records in the current index (or Sort or Selection).
-
- The fields printed and the style (form or list) of report is
- determined by the current view. The report details are saved with the
- view
-
- The print requester is displayed for you to enter formatting details
- for your report. If this is a new report, defaults will be taken from
- your current printer preferences.
-
- Your current printer preferences will be restored after the report is
- printed.
-
- The fields that can be entered are:
-
- Title
- Allows you to enter a title to be printed at the top of each page
- of your report. The title line will also show the current date at
- the left margin and the page number at the right margin. The title
- will be automatically centred.
-
- The title line is only printed if you enter a Title. Note that
- even a single space will print a blank title. Use CTRL-X to ensure
- that all characters are deleted.
-
- Left and Right Margins
- Allows you to temporarily override the current preferences
- settings. QuickFile will not print beyond the character position
- specified in the right margin.
-
- Lines/Page
- This controls the number of lines QuickFile will use on each page.
- The default is paper size minus 8 to provide a top and bottom
- margin.
-
- NB QuickFile issues a Form Feed when a new page is required. This
- depends on you setting the page height on your printer correctly,
- and may be a limitation with some printers. If you have a problem
- with this, let me know and I will look at using the preferences
- paper size.
-
- A value of zero will suppress the report title and page breaks.
-
- Print Pitch.
- This button operates like a WB2 cycle gadget. Each time you press
- it, it displays the next value from the following
-
- PICA (10 cpi)
- ELITE (12 cpi)
- FINE (15 or 17 cpi) depending on your printer
-
- Lines Per Inch
- This button toggles between 6 and 8 lines per inch.
-
- If you are printing a form type view, a number of additional
- fields are displayed which allow you to print the form in multiple
- columns such as multi-column address labels. See Label printing
- below for full details.
-
- Press the OK button to start printing or the cancel button to
- cancel any changes you have entered.
-
- Saving the view will save all of your report settings.
-
- LABEL Printing
-
- Label printing is available for FORM type views only. You will
- normally define a special view as follows:
-
- Create a new view using the New View menu item, or load a suitable
- view.
-
- Set Field Labels for the view to "No".
-
- Arrange the fields in the top left hand corner of the FORM screen to
- match the desired label format.
-
- Select print and use the following fields in the print requester to
- control your label format.
-
- Labels Across
- This specifies the number of labels to print across the page
-
- Label Width
- This specifies the width of each label. One additional space will
- be allowed between labels. If you want to print labels further
- apart, increase this value.
-
- Labels Down
- This specifies the number of labels to print down the page. This
- number of labels will print in each column, before the next column
- is filled. For example 3 across and 4 down will print in the
- following sequence:
-
- 1 5 9
- 2 6 10
- 3 7 11
- 4 8 12
- 13
- 14 etc
-
- Label Height
- This is the height of each label in lines. An additional blank
- line will be printed between each label. The default is the number
- of lines in the form.
-
- You will probably want to set Lines Per Page to zero to suppress
- page breaks as well.
-
- If you are printing a single column of labels only, you can leave
- all of the above fields blank and use the number of lines in the
- form to determine the label height.
-
-
- Options - About
-
-
- Tells you about QuickFile. If it is a registered copy, the name of the
- registered user is displayed.
-
-
- Options - Buffers
-
- This displays the number of ram buffers allowed for the file and
- allows you to change it temporarily. The items shown are:
-
- Blocks in file.
- The size of the current file expressed in blocks. This gives the
- number of buffers required to hold the whole file in memory.
-
- Buffers in use.
- The number of ram buffers currently allocated. This starts at 1
- when you open a file.
-
- Buffer size.
- Gives the amount of ram required for each buffer allocated.
-
- Maximum buffers.
- The maximum number of buffers that QuickFile will use. This can be
- changed to alter the number to be used for the current session.
- The next time you open the file, the maximum will revert to the
- number specified in the file definition.
-
- To permanently change the maximum number of buffers, use the
- QFDefine program.
-
-
- =========== DEFINING FILES ========================
-
- The file definition is now in a separate program called QFDefine. While
- this may not be as convenient, it keeps the main program smaller. This is
- mainly for my benefit when compiling and linking as I only have a floppy
- based, 1 meg A500.
-
- To start the program from workbench, click on the QFDefine icon. To start
- it from the CLI type the path and name.
-
- You can change just about everything in a file definition, except the
- block size, even after you have loaded data to the file. You can change
- field names, types and lengths. You can add or delete fields, and add or
- delete indexes. Caution should be used when changing the type for fields
- that contain data.
-
- WARNING: Deleting a field makes its data inaccessible, even if you
- re-add the same field. If you accidentally delete a field, reload
- the definition without saving your changes and start your changes
- again.
-
- =========== File Details ============
-
- The file details are shown in the box in the top left of the QFDefine
- window
-
- Block Size
- QuickFile does not read and write single records at a time, but builds
- them into blocks. This reduces the number of disk reads and writes
- required. Around 2000 seems to give good results. The only way to change
- block size is to export the whole file, define a new data base and use
- import to recreate your file. Block size must be larger than the maximum
- record size plus free space, plus some space for control fields (2 bytes
- per field plus 2 bytes for the record length).
-
- Free Space
- Specifies the amount of free space to be left in each block to allow for
- records to expand. As QuickFile only stores the actual data entered (not
- trailing blanks), additional space is required if a change makes a field
- longer. 100 seems to work OK. Records are moved to another block if
- necessary, so this is not critical.
-
- Buffers
- This is the maximum number of buffers QuickFile will use for holding
- blocks of records in memory. Unless you have very large files or are
- short of memory, use a large figure such as 100. QuickFile will never
- use more buffers than are required for the whole file.
-
- The more of the file in memory, the faster QuickFile works. The memory
- used is approximately (number of buffers * buffer size).
-
- =========== Fields =====================
-
- Use the QFDefine program to define or change fields.
-
- The fields defined so far are listed in the box at the right of the
- window.
-
- Use the Add button to add a field. A requester will appear for the field
- details. If a field is highlighted when you press add, the new field will
- be added before the highlighted field, otherwise it is added to the end of
- the list.
-
- To change or delete fields, click on the field, then press the appropriate
- button. A requester will appear for you to make changes or to confirm the
- deletion.
-
- The Field Requester contains the following fields
-
- Name string gadget
- Enter a name of up to 12 characters for the field.
-
- Length
- Enter the required length. 60 characters is a practical maximum length
- as no left and right scrolling is provided and more characters cannot be
- displayed. (You can scroll within fields on the update screen, but this
- is pretty tedious). The maximum is 250. The minimum length of a date
- field is 11 characters.
-
- Space is used only for the number of characters entered in each record,
- not for the maximum field length. In fact, if a field is empty it takes
- up no space at all.
-
- Type button
- This cycles around the available field types. Choose from character,
- date, integer or number (real). See Field Types below for more detail.
-
- All of these values can be changed at any time without any unexpected
- effects. If you reduce the length of a field, excess data is only
- discarded from records as they are updated. Increasing the field length
- will restore the old data except for records you have changed. Note that
- reorganising will reformat ALL records.
-
-
- ============= Field Types ==============
-
- Character
- This the usual character string. You should probably avoid double quote
- characters as you may need these for delimiters when exporting data.
-
- Date
- These have a minimum length of 11 characters and are always entered as
- day/month/year.
-
- The separator can be any of /-. or a space.
-
- Month can be entered as a number or a three character name
-
- Year can be entered as two or four digits. If two digits are used, a
- number greater than 50 is assumed to be this century, 50 or less, the
- next century.
-
- eg. 3/6/94 is interpreted as 03-Jun-1994
- 1-aug-10 is interpreted as 01-Aug-2010
-
- Leading zeroes can be omitted.
-
- Dates are always displayed in the format 14-Apr-1993.
-
- The following are valid dates
- 03/08/93 3-8-93 3.aug.93 03 aug 1993
-
- Integer
- Whole number, no decimals. These are displayed right justified.
-
- Number.
- Real numbers with decimals. Numbers are displayed right justified, but
- are not reformatted after you enter then. If you want decimal points to
- line up, you will have to enter the same number of decimal places in
- each record.
-
- ============ Defining Indexes ================
-
- Use the QFDefine program to define or change index field definitions.
-
- You must define at least one index to be used for sequencing your records,
- and quickly locating records. If you are not sure, pick any field that
- will give a useful sequence, such as surname, title etc. Each index can
- use a number of fields to give precise control of sequence.
-
- If you change an index on an existing file, it will be rebuilt the next
- time you open the file.
-
- Insert Button
- Pressing this brings up the Define Index requester. You must give
- the index a name (up to 8 characters) and select the fields to be used.
- You can use a portion of a long field for an index by changing the
- default length in the field requester. This will reduce sort storage
- requirements when rebuilding indexes.
-
- Modify Button
- Click on an index to highlight it before pressing this button. Displays
- the Define Index requester for you to change the fields.
-
- Delete Button
- Click on an index to highlight it before pressing this button. Displays
- a requester showing the fields in the index. Press OK to delete the
- index, press cancel if you have changed your mind.
-
- You can have any number of indexes but you should limit yourself to those
- you are going to use regularly. I find it difficult to see how more than 2
- or 3 would be useful, particularly as sorting is quite fast.
-
- Indexes are maintained automatically as you add, modify and delete records
- on your file so they reduce the need for sorting and resorting.
-
-
- ============ File Types =================
-
- FILES
-
- QuickFile uses four types of file distinguished by extension. These are
- not text files and cannot be edited with most text editors. Using a hex
- editor will probably corrupt the file. YOU HAVE BEEN WARNED.
-
- The DEFINITION FILE has no extension. This is the name you enter when
- specifying a file name for QuickFile.
-
- The DATA FILE has an extension of .Data.
-
- INDEX FILES have an extension of .nameX where 'name' is the name of the
- index as specified in the file definition.
-
- VIEW files usually have an extension of .View, but this is not
- essential.
-
-
- ============ Possible Problems ===================
-
- If you are prevented from saving your changes by a program error, system
- or power failure, your file will probably be in an inconsistent state.
-
- 1. The updated indexes will not have been written to disk. This is only
- done if you Save, Exit or Close the file. Each index must be rebuilt.
- See "Index doesn't match data file" below.
-
- 2. Changed records may not have been written to disk and will have to be
- re-done. Note that because of the way buffering works, changes are not
- necessarily written to disk in the order they are done.
-
-
-
- INDEX DOESN'T MATCH DATA FILE
-
- It is possible for an index and data file to get out of synchronisation.
- This can be caused by not closing a file properly, typically because of a
- guru or power loss with a file open.
-
- If you suspect an index has been corrupted in some way, you can delete the
- index file (called filename.indnameX). When you next open the file, the
- index will be rebuilt. This is indicated by a message such as "getblock:
- Block not found" being displayed in the Console window.
-
- You can also rebuild an index by selecting the Rebuild Index item from
- the tools menu.
-
-
- BUGS
-
- You can give several fields the same name. If you do this you will get
- some odd effects but it should not cause major problems.
-
- Error handling is still less than adequate. an Out of Memory condition
- should display a requester advising you to free some memory. In some cases
- there may not be enough memory to display the requester, and the program
- will stop with an error message.
-
- Disk errors will also cause an immediate termination.
-
- The program has been reasonably tested, but only on my A500. Some bugs
- refuse to show up until you hit exactly the right combination of
- conditions, so please let me know of any problems you find.
-
- Sending a copy of your database and the version of the program you are
- using together with instructions on how to duplicate the problem will
- help me to fix the problem.
-
-
- ============== Limits ==================
-
- QuickFile is still limited in some areas. These may be enhanced in future.
-
- Calculations
-
- There is no facility for totalling, or calculating a column based on
- other columns.
-
- Field Length
-
- While up to 250 characters are allowed per field, this is not very
- useful as each field is limited to one line.
-
- Number of Records per File
-
- The theoretical limit is currently 65,535. In practice it will be much
- less because of the indexing technique which will run out of either
- memory or processor speed. Each index requires a contiguous area of
- ram 4(n + 200) bytes in size, where n is the number of records in the
- file. The sort technique also limits the size of the file. The sort
- loads all sort keys to ram and also requires 8 bytes per record in one
- contiguous area.
-
- My largest file is about 2800 records (115 chars per record) and it is
- fine. The largest file I know of is almost 7000 records and works
- well even on my 1meg A500. A realistic maximum is probably in the
- order of 10,000 to 20,000.
-
- While files can be larger than available memory, operation is much
- faster if you set the number of buffers large enough to contain the
- whole file.
-
- I would be interested to hear from anyone using it with larger files.
-
-
- Number of fields per record
-
- 250. But I got bored at about 60, so you take your chances if you want
- to try more.
-
- Maximum characters per field
-
- 250
-
- Number of indexes
-
- More than you should ever need to use.
-
-
- =============== Additional information ===============
-
- Block Size
-
- QuickFile reads and writes records in groups called blocks. This
- improves performance as fewer reads and writes are required. Free
- space is also left in each block to allow records in the block to
- expand without having to move them on disk.
-
- Block size is specified when a file is defined and cannot be changed
- later. Block size must be larger than record size, but is not
- otherwise critical. Typical values are in the range of 1000 to 4000
- bytes.
-
-
- Buffers
-
- A buffer is a chunk of ram used to hold a block of records. QuickFile
- will try to keep as many blocks in ram as possible to reduce disk
- accesses. Performance is much better, particularly with floppies, if
- records can be held in ram rather than having to be read from disk.
-
- You can specify the number of blocks to be used for a file with the
- QFDefine program. You can override the number temporarily by selecting
- the Buffers item from the options menu.
-
- Generally you should try to have the whole file in memory. Limit the
- number of buffers if your ram is limited or you want to reserve ram
- for another application.
-
- Buffering combines the speed of a memory based database with the
- capacity of a random access.
-
-