"Datab" a non-relational database, or card index program, by Philip Taylor Datab runs on Atari ST(E) or Falcon with a high resolution monitor. There is no field typing - all fields are single-line character strings, limited in length only by their display on screen, see below. Datab database files are stored in one of two interchangeable formats viz. (i) `delimited ASCII Export-Import' format, or (ii) `address-label' format. In both cases there is an optional header created and maintained by Datab, consisting entirely of normal ASCII characters in the range 32- 127. Example of delimited ASCII Export-Import format: "Accra","Ghana","Africa" "Amman","Jordan","Asia" "Amsterdam","Holland","Europe" etc. Here the delimiters are the default IBM PC double-quotes & commas; but any other delimiters can be specified before loading or saving a database file. For example a more compact and legible form is: Accra|Ghana|Africa Amman|Jordan|Asia Amsterdam|Holland|Europe etc. Here is the same file with a header: ** Database file for Atari DataB, by P. Taylor ** Format = delimited ASCII, one line per record: ** field1|field2|field3 ** Capital ** Country ** Continent ** Date of last edit = 6-Jul-1993 Accra|Ghana|Africa Amman|Jordan|Asia Amsterdam|Holland|Europe etc. Example of `address-label' format. Each field occupies a line, and there is a blank line between records: Accra Ghana Africa Amman Jordan Asia Amsterdam Holland Europe etc. A variable number of fields is allowed in both formats; but internal blank fields are only possible with delimited export-import format. Because Datab databases are stored in `flat' files i.e. no special non- printing characters, they can be manipulated by word processors, used as data files for mail-merge operations, transmitted electronically, viewed on the screen, edited with a text or file editor, printed from the Desktop, etc. The `label' format is often very suitable for printing with a simple mailer program. Also, because Datab can use the delimited ASCII format of the PC world directly (without conversion), exchange with other database programs and spreadsheets is generally simple. Datab does not itself provide any printing facilities! Nor at present are there facilities for selecting and saving a sub-group of records. The Help key (or F1) shows the following menu: F1 or Help = Show this menu Insert = append a new record Alt F = Find string /a = all fields, /c = case sensitive, /e = exact match with whole field, /n = not match i.e. mismatch Alt N = Find Next Alt G = Goto record # Alt E = Enter a special (accented) character Alt C = Count things /a = all fields, /c = case sensitive, /e = exact Alt K = Sum number fields keypad + = Next record keypad - = Previous record Alt B or Control keypad + = Last record Alt T or Control keypad - = First record Alt S = Save file and Exit Alt A = Save As Alt X = Sort database Alt D = Define format, delimiters, fieldnames and header Home = cursor to left margin Control Delete = Delete a record Undo = exit program When a record is displayed on screen, the four cursor keys operate in a conventional way and allow you to move among and within fields. The Delete and Backspace keys also operate normally. To enter characters, just type them in anywhere & anytime. There is no `overwrite' mode; additional characters are always inserted. The Return key is similar to the down-cursor key in moving the cursor to the next line/field: it differs in that it moves from the last field of one record to the first of the next. Hence the Return key is appropriate for entering multiple new records. The latter are appended to the database; you can subsequently use Alt X to re-order the whole database. Optional field names are displayed in reverse-video at the left side of the fields: all fields are shortened by the length of the longest fieldname. The maximum number of fields is 25 i.e. the number of lines on a high resolution monochrome monitor. The maximum number of characters per field is 78 being the width of the screen minus an indent of 2; or fewer if you define fieldnames. [By arranging for the display to scroll vertically/horizontally, these limits may be overcome. Source code in HiSoft Basic is provided with this program to allow for such extensions in capability...] The maximum number of records depends on available memory: note that the entire database is held in memory while processing. The program itself occupies c. 38k, and a typical address list of 500 persons occupies about 40k, so that perhaps 5000 addresses can be accommodated in a 520ST (1/2Mb) computer. RE-ORDER, APPEND, INSERT or DELETE FIELDS At the `Load' prompt, enter # and then define a mapping from the fields of the database file to the fields of its image in memory. Suppose for example that the database file has 5 fields, then the default `field numbers' are 1,2,3,4,5 where the values refer to the file while their positions refer to the database in memory. If you specify field numbers 1,2,3,4,5,6 this will append a new field at the end of each record. If you specify 6,1,2,3,4,5 this will insert a new field at the beginning of each record. If you enter 1,2,6,3,4,5 this will insert a new field between the present second and third fields. 2,1,3,4,5 will invert the order of the first two fields. 5,4,3,2,1 will reverse the order of all fields. 2,3,4,5 will delete the first field. 1,2,3,4 will delete the last field. 1,2,4,5,6 will delete the third field and append a new one. etc. etc. DEFINE DIMENSIONS OF DATABASE This is only necessary when creating a new database or before you load a new database and you would run out of memory because the default dimensions assumed by Datab - 25 fields, 1000 records - don't accord well with the actual dimensions. At the `Load' prompt, enter # and then enter the true dimensions of the database to be loaded. DEFINE THE DELIMITERS OF A DATABASE This can always be done before saving (with the Alt D command); however to load a new database with non-standard delimiters for the first time, enter # at the `Load' prompt and then specify the delimiters. Any ASCII code can be entered by typing 1-3 digits on the numerical keypad, followed by Enter. [This technique works also for entering special characters e.g. accented ones, into the `Find' string]. DataB Filenames The default file extension is .DB which is automatically appended if you enter a filename, for either loading or saving, without a dot (and following 1-3 characters). The `list files' feature, obtained by entering * in response to the Load prompt, lists only database files with this .DB file extension. Summer 1993 Philip Taylor Glasgow