@database "QuickFile.Guide" @master "QuickFile.doc" @node Main "Contents" QuickFile v3.1 14 September 1994 by Alan Wigginton This program is not public domain, however it can be freely distributed provided all documentation and sample files are included unchanged. Please read the @{"conditions of use" link Conditions} before proceeding. Contents @{" Notices " link Copyright} @{" Conditions of Use " link Conditions} @{" Program Description " link Whatis} @{" Getting Started " link QuickStart} @{" Main Window " link Window} @{" Gadgets " link Buttons} @{" Menus " link Menus} @{" Defining Files " link FileDef} @{" Features " link Features} @{" Possible Problems" link Problems} @endnode @node Copyright Quickfile copyright 1992-1994 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. @endnode @node Conditions "Conditions of Use" QuickFile is not Public Domain, however it can be freely distributed provided all documentation and sample files are included unchanged. 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. This version of the program is free, but please let me know if you find it useful - a postcard would be great. Donations of money, stamps, software etc will be gratefully accepted. If you would like to register for updates, bug fixes and support, please send $20.00 to the address below. Overseas users please use international money order or bank draft - not personal cheques. Any cash currency is OK, but send it at your own risk. Alan Wigginton 23 Carissa St Shailer Park, Queensland 4128. AUSTRALIA I would appreciate any comments or suggestions @endnode @node WhatIs "Program Description" QuickFile is simple and flexible, flat file database. It uses @{"random access" link Random} with @{"indexes" link 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 with unique and non-unique keys - Character, date, integer, floating point and calculation 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. - Sort over any number of keys, ascending and descending order. - 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. - Multi-level grouping and totalling - Any number of open windows - Online context-sensitive help System Requirements Any Amiga computer with 512K or more RAM Workbench 2.04 or later mathieeesingtrans.library } mathieeedoubbas.library } Included with WB2 mathieeedoubtrans.library } QuickFile is written in C using DICE version 3.0. @endnode @node QuickStart "Getting Started" 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 data base make sure you backup all of the files - definition, data and indexes. To install QuickFile to a hard disk or floppy, drag the QuickFile icon to the drawer of your choice. If you want to use the AmigaGuide help system, drag the QuickFile.guide icon to the same directory. If you don't already have AmigaGuide, you can install it by doubleclicking the InstallAmigaGuide icon. The current @{"view" link Views} determines format of the display, reports, and exported or imported files. The current @{"index" link Indexes} determines the sequence for displays and reports. @{"Sorting" link Sort} and @{"Selecting" link Selection} create temporary indexes. 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 suggest 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 QuickFile " link Starting} @{" Keyboard Control ", link EditKeys} @endnode @node Starting "Starting QuickFile" 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, the 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. QuickFile opens a window on the default public screen. The window is just slightly narrower and shorter than the screen size. The window size and position are saved with each view. @endnode @node Window "Main Window" The Title Bar displays a status line containing the name of the current view, the name of the current index, the current record number and the total number of records. Status and information messages are also displayed here A row of @{"buttons" link Buttons} is displayed across the top of the window to control frequently used functions. Remaining functions are accessed via @{"Menus" link Menus}. The vertical scroll bar moves 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. You can also use the arrow keys to scroll: Down arrow Next record Up arrow Previous record Shift-down arrow Next page Shift-up arrow Previous page @{" Keyboard Controls ", link EditKeys} @{" Form Display " link Form} @{" List Display " link List} @endnode @node Indexes QuickFile uses indexes to sequence the records and to provide rapid access by key field value. Each data base must have at least one index, but you can have any number. Indexes are automatically maintained as you add, change and delete records. If you make an index unique, QuickFile will stop you from creating duplicate entries. 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). @endnode @node Random Random access means locating a record 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. @endnode @node Views "About Views" Views allow you to display data from a file in different ways. There are two basic types @{"FORM" link Form} and @{"LIST" link List}. 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" link DefineView} 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. If this isn't found, it uses its standard layout. To use your favourite view automatically, save it as filename.VIEW in the same directory as the data base. 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. @endnode @node EditKeys "Keyboard Control" RETURN Same as OK button ESC Same as CANCEL button HELP Displays help text using AmigaGuide. Other keyboard shortcuts for gadgets are identified by an underlined character. For cycle gadgets, pressing the key cycles forward, pressing the shifted key cycles backward. NOTE: These will not work if the cursor is in a string gadget. Press RETURN to deactivate the string gadget then press the required key. The following keys can be used in string gadgets: TAB Move to next field Shift-TAB Move to previous field Down arrow Move to next field Up arrow Move to previous field RETURN De-activate string gadget 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. @endnode @node Form "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. To add or delete fields, change field titles or displayed lengths, press the VIEW button; @endnode @node List "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 button" link Modify} without a record selected, the first record on the screen will be displayed for modification. If you use the @{"Delete button" link Delete} without selecting a record, you will get an error message. @endnode @node Buttons "Main Window Gadgets" Main Window Gadgets @{" GoTo Button " link Goto} Go to a record by key @{" Insert Button " link Insert} Insert a new record into the file @{" Modify Button " link Modify} Modify a record @{" Delete Button " link Delete} Delete a record @{" Form/List Button " link ListButn} Toggle between list and form @{" View Button " link View} Change view details @{" Sliders " link Sliders} Scroll through records @endnode @node Menus "QuickFile Menu Commands" Project Menu @{" Open " link OpenFile} Open a new file in a new window @{" Load " link LoadFile} Open a new file replacing the current file @{" Save " link SaveFile} Save changes to the file @{" Close " link CloseFile} Close the file and window @{" SaveAs " link SaveAsFile} Create a new file from the current file @{" New " link FileDef} Define a new file @{" Alter " link FileDef} Alter the current file definition @{" Import " link Import} Import records from a text file @{" Export " link Export} Export records to a text file @{" Reorganise " link ReorgFile} Optimise the file View Menu @{" Views " link SelectView} Display list of loaded views @{" New " link NewView} Create a new view @{" Load " link LoadView} Load a view from disk @{" Save " link LoadView} Save changes to a view @{" SaveAs " link LoadView} Rename and save a view @{" Reset Form " link ResetForm} Set view back to default layout Order Menu @{" Indexes " link SelectIndex} Display list of indexes @{" Sort " link Sort} Sort file into a new sequence @{" Show Sorted " link ShowSort} Display file in sorted sequence @{" Rebuild Index " link RebuildInd} Rebuild current index Selection Menu @{" Select " link Selection} Create a subset of records @{" Show Selected " link ShowSelect} Display selected records @{" Show All " link ShowSelect} Display all records Print Menu @{" Print Displayed Records " link Print} @{" Print Current Index " link Print} Options Menu @{" About " link About} @{" Buffers " link OptBuffers} @endnode @node Features @{" Block Size " link BlockSize} @{" Insert Record " link Insert} @{" Buffers " link Buffers} @{" Keyboard usage " link EditKeys} @{" Control Breaks " link Group} @{" Label Printing " link Labels} @{" Defining Files " link FileDef} @{" Modify Record " link Modify} @{" Delete record " link Delete} @{" Program Limits " link Limits} @{" Export " link Export} @{" Printing " link Print} @{" Field Types " link Types} @{" Report Groups " link Groups} @{" File Types " link FileTypes} @{" Selecting " link Selection} @{" GoTo Record " link Goto} @{" Sorting " link Sort} @{" Import " link Import} @{" Summaries " link Groups} @{" Indexes, About " link Indexes} @{" Views, About " link Views} @{" Index, Define " link DefIndex} @{" View, Define " link DefineView} @endnode @node BlockSize "Block Size" QuickFile reads and writes data in fixed size blocks. Each block contains a number of records, the number depending on the block size and the size of each record. 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. Block size must be larger than maximum record size, but is not otherwise critical. Typical values are in the range of 1000 to 4000 bytes. @endnode @node 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 maximum number of buffers to be used for a file when you define it . You can override the number temporarily by selecting the @{"Buffers" link OptBuffers} item from the options menu. Generally you should try to have the whole file in memory. Limit the number of buffers if memory is limited or you want to reserve it for another application. Buffering combines the speed of a memory based database with the capacity of a random access. @endnode @node Goto "Go To Requester" GoTo finds a record by key value using the current @{"index" link Indexes}. This gives fast access to any record, 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. If the key you enter does not exist, the following record is displayed. You can enter "SM" to position on the record for SMITH, which will be followed by SMITHERS, SMITHFIELD etc. @endnode @node Insert "Insert a Record" Pressing the INSERT button displays a blank form for you to enter values for a new record. 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 (or RETURN) to store the details and clear the fields ready for the next record. Press Cancel (or ESC) 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. @endnode @node Modify "Modify a Record" Pressing the MODIFY button displays the current record for you to make changes. Press the Update button (or RETURN) to store the changes. Press the Cancel button (or ESC) to keep the current values. The vertical scroll gadget is disabled while you are in update mode. The horizontal scroll gadget can be used to scroll the display and access fields that do not fit in the window. A change that would cause a unique index to have duplicate entries is not allowed. @endnode @node Delete "Delete the Current Record" Pressing the DELETE button displays a requester asking you to confirm the deletion. Press OK (or RETURN) to delete the record. Press Cancel (or CANCEL) if you really want to keep it. Once the record has been deleted you cannot get it back. @endnode @node ListButn "Form/List Button" This will toggle the current view between FORM and LIST formats. This is the same as selecting Views from the View menu, pressing the Alter button and changing the View type. Note that changes made in one mode will affect the other mode also. You may be better off creating another view. @endnode @node View "Alter View" Pressing the VIEW button displays the @{"Define View" link DefineView} 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. @endnode @node Sliders "Scrolling" 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. Scrolling may also be done using the up and down arrow keys for a single record, or the shifted keys for a full screen. 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. @endnode @node OpenFile "Open a New File" OPEN opens a new file in a new window. LOAD opens a new file that replaces the file in the current window. A @{"file requester" link FileRequest} for you to select the file to process. The rather complex pattern in the requester hides index, data, and .info files. @endnode @node SaveFile "Save Changes to a File" Selecting the SAVE menu item writes all updated blocks and indexes to disk. You should use this periodically during a long update session. @endnode @node CloseFile "Close the Current Window" Selecting the CLOSE menu item writes all updated records and indexes to disk and closes the file and window. Closing the last window will exit the program. You will asked to confirm that you really do want to close the file. If you have altered any views, a requester will be displayed for each changed view to allow you to save them. @endnode @node SaveAsFile "Create a new file from the current file" 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. @endnode @node ReorgFile "Reorganise a file" This reorganises a file by creating a new optimised version and then copying that version over the main 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 cannot reorganise if you are displaying a selection. 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. After the copy is created, a requester is displayed to ensure that you want to replace your existing file with the reorganised copy. @endnode @node SelectIndex "Select an Index" 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 Close Button will remove a "Sort" or "Selection" from memory and free the space used. To remove any permanent index alter the file definition. @endnode @node SelectView "Select a View" Selecting the VIEWS menu item displays a requester showing a list of currently loaded 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" link DefineView} to change the view. Press the Close button to drop the selected view. You cannot close all views - you must have at least one loaded. @endnode @node NewView "Create a New View" Selecting the NEW VIEW menu item creates a new view called 'unnamed' and displays it in the @{"Define View" link DefineView} requester. @endnode @node LoadView "Load View" LOAD VIEW Selecting the LOAD VIEW menu item brings up a file requester for you to select a view to load. Only filenames ending in ".view" are displayed. Clear the pattern gadget in the file requester to display all files. When you load a view, it becomes the current view and the display will change accordingly. If fields in the view cannot be located in the file definition, they will be dropped, and a requester displayed to warn you. This will happen if you delete fields from, or change field names in the file definition. 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. @endnode @node LoadView "Save View" SAVE Saves changes made to an existing view. If the view has been newly created a file requester will be displayed to confirm the name. SAVE 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. It is suggested that the .view suffix be used for easy identification. It is recommended that you save views in the same drawer as the file definition. @endnode @node ResetForm "Reset field positions in form" This resets field positions for the current view to the default positions, with the fields listed down the screen. Field sequence is maintained and the list display is not affected. This may be useful as a lot of adding and deleting of fields in a view can cause large gaps, as fields are always added to the end of the view. @endnode @node DefineView "Define View Requester" The view requester is used to define or change a view. To create a new view, select NEW from the VIEW menu. The new view is given the name "unnamed", which you can change. To change an existing view, press the VIEW button, or select VIEWS from the VIEW menu, highlight the view you want to change, then press the ALTER button. You cannot change the name of an existing view - to do this use the Save As menu item. The Define View requester contains the following elements Name Identifies the view. This can be changed for a new view, but is display only for an existing view. Available Fields List Lists the fields in the current file. Clicking on a field will add it to the current view. View Fields List Lists the fields in the current view. Clicking on a field in this list will select it and display its title and length below the list box. These can then be changed if required. The changes will only affect the current view. New fields will be added before the current selected field. To add fields to the end of the list, select the "== End ==" item. Type Buttons Choose type of view - FORM or LIST. Headings Check Box Field names are displayed if this is checked. This is normally only turned off for printing labels. Field Title String Gadget This is the text gadget under the View Fields list. You can change the field title for this view only. For example you may want a short title for a short field on the list display while keeping the full name for the form display. The title can be blank. This gadget is disabled unless one of the View Fields is selected. Length String Gadget Use this to reduce or increase the field display length for this view only. 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 View Fields is highlighted. IMPORTANT NOTE: You must press TAB or RETURN after changing either the field name or length or your changes will be ignored. Clear Button Deletes all fields from the View Fields list. Delete Button Deletes the selected field from the View 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. @endnode @node Sort "Sort Requester" 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. If you request a sort while displaying selected records, only the records in the selection are sorted. You can sort over as many fields as you like with a single sort. 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. Available Fields Lists the fields defined in this file. Clicking on a field will add it to the Sort Fields. Index Fields Lists the fields to be used for the sort. 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. New fields are inserted before the currently selected field. To add a field to the end of the list, select the "== End ==" entry. Length Changing this length allows you to sort over part of a long field, to save memory and speed sorting IMPORTANT: YOU MUST PRESS TAB OR RETURN AFTER CHANGING A LENGTH OR YOUR CHANGES WILL BE IGNORED Order Select A..Z for ascending sequence or Z..A for descending. You can mix these on different fields in the same index. Clear Button Deletes all fields from the Index Field List Delete Deletes the selected field from the Index Fields list. No confirmation is asked - it is deleted immediately. OK Button Performs the sort Cancel Cancels the sort and retains previous sort details. @endnode @node IndexReq "Define Index Requester" The Define Index requester is displayed when you are adding or changing an index. See @{"About Indexes" link Indexes} for general information on indexes. Gadgets Name Identifies the index and is used to form the file name for the index. Unique CheckBox If checked, duplicate index entries will not be allowed. Available Fields Lists fields defined in this file. Clicking on a field will add it to the fields selected for this index. Index Fields Lists 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. This reduces memory usage and may increase speed. IMPORTANT: YOU MUST PRESS TAB OR RETURN AFTER CHANGING A LENGTH OR YOUR CHANGES WILL BE IGNORED Order Buttons Select A..Z for ascending order or Z..A for descending order. You can mix these on different fields in the same index. Delete Deletes 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. @endnode @node Selection A selection is a subset 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 create a new database with 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. @{" Search Operators " link MatchOp} @{" Search Panel " link SrchScrn} @{" Search Details ", link CriteriaReq} @endnode @node ShowSelect "Show selected records" Selecting the "Show Selected" menu item will display only those records selected by the last search - which may be none at all. Selecting the "Show All" menu item will display all records using the first index defined for the file. @endnode @node SrchScrn "Search Panel" The Search Panel displays a list of search criteria with buttons for inserting, modifying and deleting them. 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. Clicking on the Insert or Modify will display the @{"criteria requester" link CriteriaReq} for you to insert or modify the details. For insertions, the new item will be inserted before the selected item. To insert a new item at the end of the list, select the "== End ==" item. 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 both 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. @endnode @node CriteriaReq "Search Details" @next Selection The Search Details requester contains the following items: And, Or Buttons Choose AND or OR to specify how this search item is combined with the previous one. It has no effect for the first item. Available Fields List Lsts all fields in the file definition. The current selection is displayed under the list. Click on a field to use it for the search. Comparison Operator (like, equal etc) Choose the @{"operator" link matchop} to be used for this search item. Value 1 Primary search value. It is always used. If you want to search for empty fields leave this empty. Value 2 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. @endnode @node MatchOp "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. 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 do not match the search criteria. The above operators can be combined with 'and' and 'or'. For details see the @{"Search Panel" link SrchScrn}. @endnode @node RebuildInd "Rebuild Index" Selecting the Rebuild Index menu item Rebuilds the current index (believe it or not!!). 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. @endnode @node Export EXPORT will 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" link Presets} are provided or you can tailor your own @{"record and field Separators" link 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 for you to specify the name of the export file. All records from the current index will be written. If you are displaying Selected records, only the selected records will be written. @endnode @node Import IMPORT will load records 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 those 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. A requester is displayed for you to select the record format to be used. One @{"preset format" link Presets} ("...",) is provided or you can tailor your own by selecting Custom and choosing the @{"Record and Field separators" link Separators} 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. Be sure to backup your database before you import a file into an existing database. 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 set up a view with fields 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. @endnode @node Presets "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 Allows you to define your own format using predefined @{"Separator characters" link Separators}. "...", 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. @endnode @node Separators "Field and Record Separators" ou can only select from the predefined delimiter codes in the cycle gadgets. Field Start This is fairly obvious and is the character that marks the start of a field. Field End 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 Separates fields in the record. It does not appear after the last field in a 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 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. @endnode @node Print PRINT Displayed Records Prints the records currently displayed on the screen. This will be a single record for a form display. 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 are determined by the current 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 Print Requester contains: 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 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 Cycle Gadget. Chooses print pitch PICA (10 cpi) ELITE (12 cpi) FINE (15 or 17 cpi) depending on your printer Lines Per Inch Cycle Gadget Toggles between 6 and 8 lines per inch. Output To Cycle Gadget Allows you to send the report to the printer or the @{"window" link ScreenRept}. If you are printing a FORM 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 @{"labels" link Labels} for full details. If you are printing a LIST view, a Group By list is displayed. This lists the report groups defined for this report. See @{"Report Groups" link Groups}. 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. @endnode @node ScreenRept "Screen Report" Reports may be directed to the screen and will be almost identical to printed reports except that print pitch is ignored. Output pauses when the screen is full, and will continue when the RETURN key or the CONTINUE button is pressed. The report can be terminated by pressing the ESC key or pressing the CANCEL button. Backward paging is not provided. Only about 78 columns will be visible on the screen as there is no sideways scrolling. @endnode @node Labels 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" link NewView} 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 Number of labels to print across the page Label Width Width of each label in characters. One additional space will be allowed between labels. If you want to print labels further apart, increase this value. Labels Down Number of labels to print down the page before starting a new column. 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 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. 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. @endnode @node About Says it all really. @endnode @node Groups "Report Groups" A "group by" field is only printed when its value changes. You can also calculate summary values for each group. Each group can be based on several fields, although usually only one is used. Any number of fields may be summarised for a group. You may know report groups as control breaks. Note that records must be sorted into the correct sequence for this to work. They are not sorted automatically. The types of groups available are Report. Gives a summary value for the whole report. If used, it must be the first group in the list. Page. Groups will start on a new page. Group fields will print before column headings. Subtitle Prints the group fields on a separate line at the start of each group. Reduces line length but looks best when each group contains a good number of records. Normal Field prints in the first line of the group only, but space is used in each line. You can have several levels of groups of the same type, but they must be listed from highest level to lowest. @{"Example" link GrpExample} @{"Group Requester" link GrpReq} @endnode @node GrpExample "Report Group Example" This example shows two groups with totals. Group 1 : City Type: Normal Group Fields: City Summaries: Value (total) Group 2 : Salesman Type: Normal Group Fields: Salesman Summaries: Value (total) Resulting report: City Salesman Client Value ---------- ------------- -------------- --------- Brisbane Fred Smith ABC Company 8000.00 XYZ Limited 6400.00 Zip Electronics 12000.00 Salesman Tot 26400.00 John Brown ZZZ Computers 5000.00 GWZ Peripherals 7200.00 Salesman Tot 12200.00 City Tot 28600.00 Sydney George Gray ACE Packaging 500.00 Note: The file would need to be sorted over City and Salesman for this to print correctly. @endnode @node GrpReq "Report Group Requester" This defines the type, grouping fields, and summaries for a single report group. See @{"Report Groups" link Groups} for a general description of the functions. Gadgets Group string gadget Names the group. This name is printed on summary lines. Type Type of group View Fields list Lists the fields available in the current view for group and summary functions. The selected field in this list can be added to either the Group Fields or Summaries lists. Group Fields list Fields used for gouping. A new group starts when any of these fields change. A group field is not required for a Report level group. Summaries list Fields to be summarised for this group. Selecting an item from this list will update the check boxes to show the summaries requested. Press the INS button under this list to add the currently selected View Field to this list. Press the DEL button to delete the currently selected field from this list Tot, Cnt, Avg check boxes These identify the summaries required for the currently selected Summary field. Any or all may be checked for one field. OK and Cancel Buttons Return to the Print Requester. @endnode @node OptBuffers "Buffer Control" 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, alter the file definition. @endnode @node FileDef "File Definition" Use the New item on the Project menu to create a new file definition. Use the Alter item on the Project menu to alter the current definition. The data and any open views are saved before you alter the current defintion and any sorted or selected details are dropped. 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. @{" File Details " link FileDets} Block size, Buffers etc. @{" Defining Fields " link Fields} @{" Defining Indexes " link DefIndex} Press OK to save any changes you have made and return to the main panel. Press CANCEL to reload the original file definition. @endnode @node FileDets "File Details" The file details are shown at the top left of the Definition panel. 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). @endnode @node Fields "Defining fields" 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. The fields defined so far are listed in the box at the right of the window. Use the Add button to add a new field. A @{"requester" link FieldReq} will appear for the field details. If a field is highlighted when you press add, the new field will be added before the selected field. To add a field to the end of the list, select the "== End ==" item. After each field is added the requester is cleared but remains active for you to add another field. Press CANCEL when you have finished adding fields. To change an existing field, click on the field name, then press the Modify button. The @{"Field Requester" link FieldReq} is displayed for you to enter your changes. To delete a field click on the field name, then press the Delete button. You will be asked to confirm the deletion @endnode @node FieldReq "Field Requester" Displays the current attributes of a field and allows you to change them. Name string gadget Enter a name of up to 12 characters for the field. Length 60 characters is a practical maximum length as no left and right scrolling is provided and more characters cannot be displayed on a form. 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. Decimals Number of decimals stored and displayed for the field. Values entered in the field will be rounded to this number of decimals. Type Cycle Gadget Choose the field type from character, date, integer, number (real) or calculation. See @{"Field Types" link Types} for more details. Mandatory Check Box If checked, the field must have a value in all records. You will not be able to add a new record without a value in this field. Justify Right Check Box If checked, the field will be displayed with the value right justified. This is the default for Integer, Float, and Caculated fields. Character and date fields default to justified left. Expression String Gadget This contains the expression to give the result of a calculated field. The expression can contain field names, constants, and the add (+), subtract (-), multiply (*) and divide (/) operators. Field names containing spaces must be enclosed in double quotes ("). Normal precedence rules apply and brackets may be used to control sequence. Fields must be defined before they can be referenced. 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 reorganise will reformat ALL records. @endnode @node Types "Field Types" Character Standard character string. 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. Float. Real numbers with decimals. Calculated The field value is calculated from other fields, which may themselves be calculated fields. The calculation is specified in the Expression string gadget. @endnode @node DefIndex "Defining Indexes" You must define at least one index. 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. You can index on any field type including calculated fields. You can also define an index as unique to prevent duplicate records being created. If you change an index on an existing file, it will be rebuilt when you return to the display panel. Select the index from the list and press the appropriate button. The @{"Index Requester" link IndexReq} is displayed for you to define or alter an index definition. You can have any number of indexes but you should limit yourself to those you are going to use regularly. Indexes are maintained automatically as you add, modify and delete records on your file so they reduce the need for sorting and resorting. @endnode @node FileTypes "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. VIEW files usually have an extension of .View, but this is not essential. INDEX FILES have an extension of .nameX where 'name' is the name of the index as specified in the file definition. @endnode @node Problems "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 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. A mismatch between the index and data is indicated by a message such as "getblock: Block not found". To correct this you can rebuild an index by selecting the Rebuild Index item from the QuickFile tools menu, or you can delete the index file (called filename.indnameX). When you next open the file, the index will be rebuilt. BUGS 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. @endnode @node Limits Field Length While up to 250 characters are allowed per field, this is not very useful as each field is limited to one line. Record Length 32,767 bytes Number of Records per File The theoretical limit is currently 65,535. In practice it is much lower 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. Number of fields per record 250. But I got bored at about 60, so you take your chances if you want to try more. Number of indexes No limit. Number of views No limit. @endnode