@database "QuickFile.Guide" @master "QuickFile.doc" @node Main "Contents" QuickFile v3.20 24 August 1999 by Roland Florac QuickFile v3.19.0 6 June 1996 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. The original program was written by Alan Wigginton. As Alan don't developp the program now, I have asked him the permission to continue the developpment. So I have localized the program now, and adapted it to use the @{"gtlayout.library" LINK GTLAYOUT} for the requesters. They are not major changes except for the interface. This guide was originally written by Alan, it has not been updated yet. 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-1996 by Alan Wigginton, 1999 by Roland Florac 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 can be used for free on the condition that you write and let me know that you are using it - a postcard is fine. The About requester is displayed when the program starts and when each window is closed. I am the developper of the program now : Roland Florac 6 Rue des Chardonnerets Chez Corbin 17610 Chaniers FRANCE Email: Roland.Florac@fnac.net The original author of the program is : Alan Wigginton 23 Carissa St Shailer Park, Queensland 4128. AUSTRALIA Phone 61 7 3208 9441 (from overseas. Remember time differences) 07 3208 9441 (from within Australia) Email: alanw@powerup.com.au (Until 22 June 1996 only) I would appreciate any comments or suggestions. You will not get a reply to snail mail unless you enclose enough to cover the return postage. I suggest an International Reply Coupon. @endnode @node WhatIs "Program Description" QuickFile is a flexible, flat file database. It uses random access 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 or non-unique keys - Data types include Character, Date, Time, Integer, Floating point, Calculated, Cycle, Image and External. - 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 report grouping and totalling - Any number of files open in re-sizable intuition windows - Online context-sensitive help - ARexx port supporting macros and commands from external programs. - Easy to use Intuition interface with font sensitivity. System Requirements Any Amiga computer with WB 2.04 or later 1 meg or more RAM recommended Required libraries asl.library mathieeedoubbas.library mathieeedoubtrans.library @{"gtlayout.library" LINK GTLAYOUT} - to open requesters Optional libraries iffparse.library - to display Image fields rexxsyslib.library - to use ARexx amigaguide.library - to use on-line help QuickFile will work with XFH-handler (a file compression program) but XFH-handler requires that the decompressed file fit completely in ram. To work with QuickFile such programs must support update of an existing file. QuickFile is written in C using DICE version 3.0 on an Amiga 500 with a 20MB A590 and 3 meg ram. @endnode @NODE GTLAYOUT "gtlayout.library" @TOC MAIN The author of the gtlayout.library is Olaf `Olsen' Barthel. It's available on Aminet (dev/gui). @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. 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" QuickFile opens a window on the default public screen. The default window size is just slightly narrower and shorter than the screen size. The window size and position are saved with each view. 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. @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 Windows can be resized using the standard size gadget and zoom gadgets. The window can be shrunk to a small Title bar height by using the Project/Iconify menu item. @{" 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 Views "About Views" Using views you can display one 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. Field position and size for form views can also be changed by dragging 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. NOTE that changing a field's details in the file definition will not automatically change details in the view. @endnode @node EditKeys "Keyboard Control" These keys can be used if no string gadget is active RETURN Same as OK button ESC Same as CANCEL button TAB Activates first string gadget HELP Displays help text using AmigaGuide. You can continue to use QuickFile while the help window is displayed. Down arrow Next record Up arrow Previous record Shift-down arrow Next page Shift-up arrow Previous page In requesters with a single listview, up and down arrows will move through the items. 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: The above will not work if the cursor is in a string gadget. Press RETURN or ESC 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 if value is valid ESC De-activate string gadget ignoring errors 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 FORM/LIST button can be used to quickly change the current view between form and list types. Field positions can be changed by dragging fields around the window with the mouse. Field sizes can be changed by dragging the bottom right corner of the drag box. Note that although field height can be changed, only images will actually use more than a single line. Pressing the "R" button displayed at the start of an external field will run the command defined for the field, provided the field is not empty. To add or delete fields or change field titles, 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. While in List mode, you can only change field position and length using the Define View requester. 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 @{" All/Sel " link AllSel} Toggle between all and selected records @{" Images CheckBox " link Images} Toggle image display @{" 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 OpenFile} 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 @{" Iconify " link Iconify} Iconify the window 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 SaveView} Save changes to a view @{" SaveAs " link SaveView} Rename and save a view @{" Alter " link View} Alter the current 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 @{" Query " link Selection} Create a subset of records @{" Sel/UnSel Record " link ToggleSel} Select/Unselect single record @{" 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 @{" Buffers " link OptBuffers} @{" ARexx macro " link RunMacro} @{" Configuration" link Config} @endnode @node Features @{" ARexx Macros " link RunMacro} @{" Indexes, About " link Indexes} @{" Block Size " link BlockSize} @{" Index, Define " link DefIndex} @{" Buffers " link Buffers} @{" Insert Record " link Insert} @{" Control Breaks " link Groups} @{" Keyboard usage " link EditKeys} @{" Configuration " link Config } @{" Label Printing " link Labels} @{" Defining Files " link FileDef} @{" Modify Record " link Modify} @{" Delete record " link Delete} @{" Printing " link Print} @{" Export " link Export} @{" Program Limits " link Limits} @{" External Fields" link ExtFlds} @{" Queries " link Selection} @{" Field Types " link Types} @{" Report Groups " link Groups} @{" File Types " link FileTypes} @{" Sorting " link Sort} @{" Fonts " link Config} @{" Startup script " link RunMacro} @{" GoTo Record " link Goto} @{" Summaries " link Groups} @{" Images " link Images} @{" Views, About " link Views} @{" Import " link Import} @{" 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. Use fewer 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 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. For images or external fields, you can enter the file name in the string gadget or press the arrow button to get a file requester. Names entered into the string gadget will be accepted even if the file does not exist. Press the Update button (or RETURN) to store the changes. Press the Cancel button (or ESC) to keep the current values. 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 will not be accepted. @endnode @node Delete "Delete the Current Record" Pressing the DELETE button displays a requester asking you to confirm the deletion. Press the OK button (or RETURN) to delete the record. Press Cancel button (or ESC) 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 but this is nice and fast where field length and order are the same. @endnode @node AllSel "Toggle between All and Selected records" Pressing the ALL/SEL button will switch back and forth between displaying all records in the file and displaying only selected records. You can also use the "Show All" and "Show Selected" items on the Selection to do this. @endnode @node Images "Image Display" The Images checkbox in the main window toggles image display on and off for faster processing. Images appear in the form display only, with no scaling or palette remapping, however they are clipped to fit in your field box. Only a file name is stored in the database with the image being loaded from the file for display. The external path specified in the @{"file definition" link FileDef} is used as a default path for the image file and file names are normally relative to this default path. Searching, sorting and printing operate on the file name only. To display images with the correct palette and resolution, use an external field with your favourite display program. @endnode @node ExtFlds "External Fields" External fields store a file name and are displayed with an "R" button beside them. Pressing the button runs the pre-defined command and passes the file name from the record. External fields allow you to reference any type of external file from within QuickFile. You can use them to display pictures or text files, or to play sounds or animations. You define the command line to be run when you define the @{"field." link Types} The external path specified in the @{"File Definition" link FileDef} is also the default path for the data file. Path names in each record are normally relative to the default path. Any program that can be run from the Shell should be able to be used. Any error messages will be displayed in a separate window. If you need to pass flags to the command with some files but not others, you can include the flag with the file name. For example: Pictures:Imagefile -l @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 is presented for you to select the file to process. The rather complex pattern in the requester hides index, data, and .info files. If it also hides your definition files, clear the pattern gadget. @endnode @node SaveFile "Save Changes to a File" Selecting the SAVE menu item writes all updated blocks and indexes to disk. Nothing is written if no changes have been made. 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 it. @endnode @node SaveAsFile "Create a new file from the current file" @next FileDef 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 Import @next Export @prev FileDef 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: The order and number of fields in the view must correspond to the those 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 Field Length 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 by me. 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 in the correct format. If you require a format that is not included, let me know as I should be able to include it very easily. The same goes for separator characters. @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. Usually none unless fields are enclosed in quotes. 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. Usually none unless fields are enclosed in quotes. Field Separator Separates fields in the record. It does not appear after the last field in a record. Usually TAB or comma. Record End Marks the end of each record. Usually a line feed. 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 pre-defined as "...", but can be defined using a custom layout as follows: 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 Export @prev Import 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 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. This can drastically improve performance with floppies. 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 Iconify The Project/Iconify menu item shrinks the window to a short title bar. The window can be restored by choosing the menu item again (it acts as a toggle) or by clicking on the window zoom gadget. QuickFile remains active while it is iconified and you can use most of the menu items and keyboard shortcuts. @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 Free 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 SaveView "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 View "Alter View" Choosing the VIEW/ALTER menu item displays the @{"Define View" link DefineView} requester showing the current view ready for your changes. You can change any loaded View by choosing the View/View menu item, selecting a view and pressing the Alter button. @endnode @node ResetForm "Reset field positions in form" @next SelectIndex 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 View 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 are inserted before the selected field. Type Buttons Choose type of view - FORM or LIST. Headings Check Box Field titles are displayed if this is checked. This is normally only turned off for printing labels. Lock Check Box If checked, locks a view to prevent accidental dragging of fields. This should be set to checked and turned off only when you want to arrange fields by dragging them in the view. 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 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 Free 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 Sort "Sort Requester" @next ShowSort 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 for ordering. 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. A new field is added after the selected field. Select == End == to add a field to the end of the list. Length Changing this length allows you to index on part of a long field. This reduces memory requirements for rebuilding indexes. 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 selected field from the selected fields list. No confirmation is asked - it is deleted immediately. Clear Deletes all fields from the selected fields list. OK Button Accepts the new or changed index Cancel Cancels any changes you have made. @endnode @node ShowSort "Show Sorted" @prev Sort This displays the records using the current sort sequence (if any) @endnode @node RebuildInd "Rebuild Index" @prev sort 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 Selection A selection is a subset of the data base that is the result of a Query. 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. You can also @{"Select or UnSelect" link ToggleSel} an individual record. 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. You specify the required sequence for the selected records. The default is the same as the current index. You can run your query against the whole file or the results of the previous query. You can use any number of criteria for a Query, but the more you have the longer it will take. @{" Query Operators " link MatchOp} @{" Query Requester " link SrchScrn} @{" Search Criteria ", link CriteriaReq} @endnode @node ToggleSel "Select/UnSelect a single record" This item on the Selection menu will select or deselect a single record. If you are viewing a @{" selection " link Selection} (using index "Selected"), the current record is removed from the selection. If you are using any other index, the current record is added to the selection. Nothing happens if the record is already in the selection. A message is displayed in the title bar indicating the action performed. For a form view the current record is the one displayed. For a list view the current record is the highlighted record or, if no record is highlighted, the first record on the screen. @endnode @node ShowSelect "Show selected records" @next print Selecting the "Show Selected" menu item will display only those records selected by the last query - which may be none at all. Selecting the "Show All" menu item, or pressing the All/Sel button, will display all records using the first index defined for the file. @endnode @node SrchScrn "Query Requester" The Query Requester displays a list of search criteria with buttons for inserting, modifying and deleting them. The FROM Cycle Gadget specifies whether the query is run against all records or only those selected by the previous query. The ORDER Button displays the @{"Sort Requester" link Sort} so you can specify the order of the selected records. The SAVE button brings up a File Requester to save a Query. The Selection Criteria and sort order are saved. The LOAD button brings up a File Requester to load a previously saved Query. The LISTVIEW displays the search criteria. 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 "Selection Criteria" @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. This is not present 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 that 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 @{"Query Requester" link SrchScrn}. @endnode @node Print @next OptBuffers @prev ShowSelect 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 This will be printed at the top of each page of your report. It will be automatically centred. The title line will also show the current date at the left margin and the page number at the right margin. 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 and shows the number of characters that fit on an 80 column printer using the selected 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, the @{"window" link ScreenRept} or a file. The file will not contain any printer escape codes. The other objects displayed depend on whether you are printing a List or Form view. FORM View A number of additional fields are displayed for controlling multiple columns such as multi-column address labels. See @{"labels" link Labels} for full details. LIST View Group By List This lists any report groups for this report. See @{"Report Groups" link Groups}. Summary Only Check Box If checked, only sub-total and total lines are printed. The "Group By" field values are printed with the summary values for the group. Note that an extra 4 characters are added at the start of each line for the summary type (Cnt, Tot, etc). You must define a Report Group for this to work. See the Address Book example. Wrap Fields Check Box If checked this will wrap fields over succeeding lines where the field length is longer than the width defined for the view. The wrapping is done on word boundaries if possible. 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. Adjustments to window size after printing begins are ignored. Only about 78 columns will be visible on the screen as there is no sideways scrolling. To see more characters across the screen, change the Report font in the @{"Configuration Requester" link Config} to use a narrower font if you have one. @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 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. 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 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. Insert and delete operate as for the Group Fields list. Tot (Total), Cnt (Count), Avg (Average) check boxes These identify the summaries required for the currently selected Summary field. Any or all may be checked for one field. Count can be used with any field type but Total and Average can be used only with Float, Integer and Time field types. OK and Cancel Buttons Return to the Print Requester. @endnode @node OptBuffers "Buffer Control" @prev Print Displays the number of @{"RAM buffers" link 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 RunMacro "Run ARexx Macro" You run an ARexx macro by selecting the Options/ARexx macro menu item. This brings up a requester for you to enter the macro name. Pressing the 'File' button brings up the file requester for you to choose the file to be run. If you don't enter a file extension it defaults to ".QuickFile". QuickFile sets the current directory to the database directory before passing the macro to ARexx. ARexx will look in this directory first, then in the REXX: directory. I suggest you put macros written for a particular database in its directory and general macros in the REXX: directory. You can also run an ARexx macro automatically on start up to do things like loading additional views or selecting an index. Name the script filename.STARTUP and place it in the same directory as the file. The display is not normally redrawn until the macro completes. This menu item is disabled if RexxSupport.library is not in your libs: directory. ARexx must also have been started using REXXMAST before you can run a macro successfully. See the Arexx commands documentation for a description of the commands available from ARexx. @endnode @node Config "Configure" The Configure Requester is obtained by selecting Configuration on the Options menu. The settings are saved in a file called "QuickFile.config" in the same directory as the QuickFile program. Memory Save Checkbox Selecting this checkbox tells QuickFile to reduce memory usage. It defaults to selected. Deselect this to speed up sorting if you are not short of memory. Online Help Selecting this checkbox makes the context sensitive AmigaGuide help available. It defaults to selected. Help will only be available if you have AmigaGuide installed. FONTS To change a font, press the arrow gadget beside the font name. This will bring up a font requester for you to select a typeface and size. Note that very wide fonts may trash some gadget imagery. Standard Font Specifies the font to use for text in most gadgets. This may be a proportional font. List Font This is the fixed width font used for list displays. This includes QuickFile's list display and Listview gadgets. Report Font This font is used for printing reports to the screen. Use a narrow font to display more characters on the screen. Save button Saves the settings in the QuickFile.config file and uses the settings. Use button Uses the settings but does not save them for permanent use. Cancel button Cancels any changes made and retains the previous settings @endnode @node FileDef "File Definition" @next Import @prev SaveAsFile 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. Block size, Buffers, Free Space see @{" File Details " link FileDets} @{" Defining Fields " link Fields} @{" Defining Indexes " link DefIndex} External Path This is a default path used for images and external files. The file name in each record is stored as a name relative to this path which can reduce the number of characters in each record. It is ignored if you enter a full path name for file (ie includes a colon). 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 centre 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). WARNING. If you using a compression program like XFH-handler with QuickFile, set the number of buffers to 3. XFH will already have the decompressed copy of the file in ram. @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. Avoid using spaces in field names if there is any chance you will use ARexx. You can use spaces in ARexx but extra quotes are required and it can be confusing. Note that changing a field name will not change the field titles in an existing view. 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. Can be 0 and is only enabled for Float type fields. Type List View Choose the field type for this field. 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. Calculated Check Box If checked the field is calculated from other database fields and not stored in the file. You must enter an expression to calculate the field. Any field type except Dates can be calculated. Expression String Gadget Contents depend on field type Calc: The expression to calculate the field value Cycle: The list of possible values See @("Field Types" link Types} for details. Command String Gadget For External fields only, contains the command to be run against the field. See Field Types for more details. All of these values (except Type) 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. Type can be changed but you may lose values if you change to a type that is not compatible with the field values. You will always lose existing values if you change type to or from Cycle. @endnode @node Types "Field Types" Character Standard character string. Float. Real numbers with decimals. Integer Whole number, no decimals. Calculated The field value is calculated from other fields, which may themselves be calculated fields. Enter the calculation in the expression string gadget. The expression can contain field names, constants and operators. Field names containing spaces must be enclosed in double quotes ("). Normal precedence rules apply and brackets may be used to control evaluation order. Fields must be defined before they can be referenced. For numeric fields (Float, Integer and Time) the operators are add (+), subtract (-), multiply (*) and divide (/). Example: Cost + Cost * Markup / 100 For all other fields only concatenate operators can be used. Use + to leave a space between values. Use | to join fields without leaving a space. Constants are preceded by a c and enclosed in double quotes and can be no longer than 7 characters. You can include any field type in the expression for a character field. Example: c"Dear" + Title + LastName or Pathname | FileName Date These have a minimum length of 11 characters and are always entered as day/month/year. For entering data, 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. For example 03/08/93 3-8-93 3.aug.93 03 aug 1993 are all valid and will all be re-formatted to the format 03-Aug-1993. Time These are in the format of hh:mm:ss. For entering data, the separator can be either : or a space. You can omit trailing (low order) values and they will default to zero. Examples: 3:10 will be taken as 03:10:00, 2 will be taken as 02:00:00 Cycle A list of values is associated with a cycle field. The value is maintained using a cycling button instead of a string gadget. Enter the list of values, separated by commas, in the expression string gadget. Any spaces you enter will be included in the value - you probably don't want leading spaces. for example Blue,Green,Light Blue,Red instead of Blue, Green, Light Blue, Red Image An @{" image " link Images} that is displayed in the QuickFile window. Only the file name is stored in the database. External Stores strings (typically file names) that are passed to an external program for processing. This can be used for images, sounds, text files, animations or whatever. Enter the command line in the Command string gadget when defining the field. Use %s to indicate where the field value is to be inserted. For example: dh0:utilities/display %s The full path name of the command is required unless it is in the c: logical device. @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. The Data and Index files 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. While the View and Definition files are text files and can be edited, I recommend that you do not. 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. QUERY files have an extension of .qry and contain a Query Definition. @endnode @node Problems "Possible Problems" You add a field to a file but it does not display in a form or list. This happens because fields are not added to a view automatically. If you add a file to a file, you must also add it to any views using the View/Alter menu item. Note that if you have not saved a view, QuickFile generates a default view which will be updated automatically. Error message: "getblock: Block not found". This is usually due to a mismatch between the index and data files. 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. DATA INTEGRITY If you are prevented from saving your changes by a program error, system or power failure, your file may 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. IF YOU ARE SHORT OF MEMORY Try the following to reduce memory usage: Disable the online help using the Config menu item in the Options menu. Ensure the Memory Save checkbox is checked in the Config requester. This will reduce the memory used during sorts. Define only a single index. That is still one more than most programs allow. Hard drive users can reduce the number of buffers. This will also work with floppies but may be unacceptably slow. If you are using a compression program such as XFH-handler, reduce the number of buffers in the @{"file definition" link FileDets} to 3. Otherwise both XFH and QuickFile will be holding the file in ram: BUGS and OTHER CREATURES 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. Known problems and restrictions are: - If you drag a field off the bottom of the window, the drag box is drawn over the border but is not erased properly if you release the mouse button. - A Field is clipped horizontally, but not vertically, if it does not fit completely in the visible window. This causes images to disappear instead of being clipped if you make the window too small. - No attempt is made to remap image palettes. You may get odd colours or a block of a single colour. - Switching views from an ARexx macro can cause a series of window redraws to occur after the macro has completed. This is because switching views can cause window resize messages to be sent by Intuition and these are not seen by QuickFile until the macro completes. - Disk thrashing can occur on startup if the file contains images because QuickFile is trying to load an image while AmigaGuide is scanning the QuickFile.guide file. - Occasionally you may find a duplicate record in an index. You may notice that a record appears twice and one index will be 4 bytes larger than the others. To fix this, either reorganise the file or rebuild the index. If you write to me with a problem you would like fixed, it is much easier for us both if you send a copy of your database, the version of the program you are using, and instructions on how to duplicate 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. The largest file I know of is almost 18000 records. A file of 7000 records worked well on my (then) 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