JBData Page 1 ---------------------------------------------------------------------- JBData Version 1.4 (c)JBSoft 1994/5 ³ ÃÄ¿ ÀÂÁÄÙ ÀÄ¿ ÄÄÙ Description 2 Installation 2 Operation 2 Marked Records List 16 Edit Window 18 Link/Paste 20 Help 21 Thanks 21 Get-out 22 Limitations 22 Known Problems 22 Contact 22 Index 23 JBData Page 2 ---------------------------------------------------------------------- Description ----------- JBData is a free application for the enhanced display of database files (either those created by Data or those made by an OPL program). If the data file has fields made up of types other than strings then, after editing, a simple check will be made to check that the field is still acceptable in its original form (the editor only works on text so conversions take place before and after edits). The program allows for extra display modes, sorting of the file, better search utilities, a simple password system and other improvements (but see the section called 'Known Problems'). Installation ------------ 1. Copy JBDATA.APP to any \APP\ directory. 2. From the System screen navigate to the place you wish to install the application on the System screen and press Psion-I. 3. Select the drive on which JBDATA.APP resides using the left and right cursor keys. 4. Select JBDATA.APP in the file list using the up and down cursor keys. 5. Press Enter. The application will install on the screen at the chosen place. A file list of Data files that are in the \DAT\ directories on all drives will be displayed under the JBData icon in the same way as they are under Data. There is no need to remove Data for JBData to work but, because of the vague similarity of icons, some care should be exercised that the required application is selected before running it. Operation --------- To start the application highlight a file under the JBData icon and press Enter. Alternatively, on any file under the JBData icon, press Tab and navigate to the file you wish to open using the cursor keys and Enter. Once the cursor is on that file, press Enter twice (the first press will show a dialog with the name of the file inserted - the second press will open that file). N.B. There is a possibility that, if there is insufficient memory available to run the application, you may be presented with a blank screen. If this happens just press Psion-Esc. This will take you back to the System screen where you can close down some applications to free some memory. I have intercepted this problem as much as possible but have been unable to eliminate it completely. JBData Page 3 ---------------------------------------------------------------------- N.B. From version 1.3.1 the method of storing the setup has changed - this should speed up the opening of the data files but, the first time a file is opened that was previously configured with an earlier version of JBData, the opening will be slower as a conversion takes place. Subsequent openings will then be faster than before (about twice as fast). When the application is running use the following keys to operate it. Movement -------- Down - moves to the next record. In Page mode, if at the last record, will move to the first record. If the cursor is showing in Page mode then moves down the current record. Up - moves to the previous record. In Page mode, if at the first record, will move to the last record. If the cursor is showing in Page mode then moves up the current record. PgUp - In Line mode shows the previous page of records. If the cursor is showing in Page mode then pages down the current record. PgDn - In Line Mode shows the next page of records. If the cursor is showing in Page mode then pages up the current record. Ctrl-PgUp - Show the first record in the file. Ctrl-PgDn - Show the last record in the file. Left - In Line mode moves the display one field to the left. Right - In Line mode moves the display one field to the right. Home - In Line mode moves the display to the first field. End - In Line mode moves the display to the last field with data. Enter - Either move to next record or toggle the Page/Line mode display (depending how set with Shift-Psion-R). Shift-Enter - Move to previous record (dependant on state of Shift-Psion-R). Esc - One press clears the quick find. Two presses in quick succession will clear the line display back to the frozen fields (if any are defined) and the next field. This is a quick method of resetting the visible fields to a consecutive sequence starting with field one. Tab - In Page mode this will allow the use of the cursor keys for missing lines to be scrolled onto the page using the cursor keys. - In Line mode this key finds the next match for QuickSearch (this option is available in Page mode using Psion-Tab). Open File Psion-O --------- This option opens a previously existing file. If the file has been previously opened in JBData, configured, and that configuration saved, then this configuration will be used to setup the display. Any Datafile created by Data, JBData, or an OPL program can be opened. At the moment I know of no datafile that cannot be opened by this application. If you come across one please let me know. JBData Page 4 ---------------------------------------------------------------------- If a password has been set then this will be prompted for before the file will open. Merge File Psion-M ---------- To merge two files into one. Normally this would be used to combine two data files. A selection box is shown in order that you can choose the file to merge with the existing database. It is necessary that the two files to be merged have identical fields types in the same order unless merging in text when there is a field check before the record can be saved. After the filename has been given another dialog appears that provides the options of merging the two files, over-writing the current file with the new file and merging or over-writing the file and remapping the new data so that incoming fields can be directed to different fields in the destination file. The setup will be transferred at the same time if over-write is selected. If it appears that a file has got corrupted and is miss-behaving, it is worth creating a new file with the same format and try a Merge from the corrupted file. In many instances this will cure the problem. It is also possible to merge a text file with a data file. The data file must consist only of fields with strings for this to work unless the text has been formatted to suit the field types. In this dialog another option is given to allow overwriting the current data (i.e. make a new file from the data), merge with the current data, or merge and remap the new data. In the instance of over-write the setup will be taken from the existing file (unlike over-writing .DBF files). Start off as for a Datafile merge. Once the filename has been selected then a further dialog will prompt for the character delimiter to be used as a field terminator. If 'Newline' is chosen then a record will consist either of the number of lines that are the equivalent of the number of fields set when the datafile was created, or until two Newlines are encountered with no data between them. Otherwise, records will consist of either the number of fields originally created, or until a new line is encountered in the text file (whichever occurs first). If the maximum number of fields comes first then the remaining data will be placed in the next record. It should be noted that, if a delimiter occurs within the text, this will be taken as a delimiter unless the text data is within quotes - the delimiter should be chosen with that in mind. If the text is enclosed in quotes (") then an option to remove these quotes should be set to Yes (the default is No). There is also an option to give a Labels file. This is for labels saved during 'Save As' and the data will over-write any Labels in the file. The Labels file is always in the format one line per field (whether that field has a label or not) and the data is not enclosed in quotes. A further option on this line is 'Combined'. This enables labels that had been saved with each record to be recovered and removed from the data. If this method is selected then a small edit box will appear allowing the cursor to be placed before the first letter of the data. Anything before this position will be treated as a Label and used to create them. JBData Page 5 ---------------------------------------------------------------------- A further option for a text merge (only for when the file is over- written) is to accept the first record as Labels. Any data in this first record is used to generate Labels which will be saved with the data. It is possible to generate a separate Labels file manually as long as the rule of one line per field is obeyed and the file is clean text (rather than a Word file). Finally, there is the choice of Merge, Overwrite, or Merge and Remap to allow the text to either add records to the existing file, to replace the data currently there, or merge and remap the fields of the new data. N.B. Re: Merge and Remap This facility enables the new data to be mapped to different fields (i.e. Field 1 could, after the merge, contain the data from the merged file's field 2). For this to work all fields have to be of the same type (normally Strings) - this is because the check for consistency across the files does not take into account the remapping at the moment but takes the original layout of the data to be imported. Re: Merging Text files with quotes There is a slight possibility that a record might get split in two if a delimiter character occurs in quotes but starts off the file immediately followed by a Shift-Enter character (i.e. if the delimiter is a ',' then '",[Shift-Enter]' will split the record at that point rather than at the appropriate point). This can be avoided by not translating Shift-Enter to a Newline when exporting the data to text. The 255 character limitation that exists for the Data application in Merge mode is not applicable and the limitation is that of the Psion in that no record can be greater than 4096 bytes in total (this includes some headers and string length bytes so a more realistic maximum length is 4000 bytes). N.B. This text merge option is not as fast as the one in Data for at least two reasons: 1. Strings longer than 255 are permitted. This requires a different technique to that of Data to merge the data. 2. Field types other than strings are permitted. This requires a check to make sure that the types agree. New File Psion-N -------- To create a new file use this option. A dialog box is given to choose the new filename. Once this name has been chosen a dialog will prompt for the number of fields to include (the default (and maximum number) is 32). Another dialog will then ask for the type of fields required (the default for all fields is String) - all the fields should be correctly entered. The file will then be created and you will end up in the Edit screen as a prompt to input some data. If the directory for the file does not exist, it is automatically created. JBData Page 6 ---------------------------------------------------------------------- If it is desired to make a Data file from a text file then create a file using this option with 32 fields (all strings). When presented with the Edit screen to input the first record, press Escape. A message will appear 'File Empty'. From there select Merge and merge in the text file as per normal. Save As Psion-A ------- To save the current file with a different name, save selected records, or to save as text, use this option. A dialog box will be displayed to prompt for the new name to use. Once this new name has been input (along with any path that is needed) then another dialog may be shown asking if All records should be saved or the Selected records only. This dialog will only show if a MultiFind or Marked Record display is current (MultiFind listings are actually Marked Record listings). Another dialog will then be shown which allows for the data to be saved either as another data file or as text. If the Data option is selected then the data will be saved complete with any setup. If the text option is selected then a delimiter character must be set to distinguish between the fields. This works in a similar way to that of the Data application but without the 255 character limit of that application. The options for the delimiter are: New Line - in this mode blank fields are seeded with a space. Tab Comma Semicolon Other - specify the character on the Char Code line. If it is required to re-import the data then the delimiter should be chosen accordingly (i.e. there should be no occurrence of the delimiter within the data, otherwise this will be taken to be a delimiter. Quotes allow the delimiter to exist within the data). There are also options to save the data enclosed in quotes ("), how to deal with Shift-Enter within fields, and to save the Labels into a separate file, with each record or as the first record in the file. The separate Labels file, if created, has a default extension of .LAB. The Labels are always saved without quotes and each field ending in a carriage return in this separate file. Quotes will not be put around fields that were originally values. Labels saved as the first record will have all the attributes that normal records in the text file have and will be treated in exactly the same way. If the option to save the Labels combined with the data is chosen then the appropriate label will precede the data to which it relates on each record. The label will be right justified against the data so that, when viewed, there is some neatness in the display. This right justification should be maintained if it is desired later to strip the labels using JBData. Compress File Psion-K ------------- This option compresses the current file, clearing all deleted records from the database. If the file is on a Flash SSD then a dialog is shown so as to give the opportunity to abort the process (it will use as much space again as the original file on a Flash pack). JBData Page 7 ---------------------------------------------------------------------- Sort File Psion-S --------- The current file may be sorted. Any sort will automatically update the file saved on the disk and over-write the original file. A dialog box is shown with a choice of three fields to sort on. If you wish to sort on less than three fields then make the fields to be ignored the same as the last operational field. The default is to sort on the first three fields. There is also the choice to choose the direction of the sort (either Forwards or Reverse - the reverse sort would put Z before A rather than A before Z. If you wish to ignore NULL fields (i.e. ones that are empty of data) then select 'Ignore' in that option otherwise the default is seed with a 'Space' which seeds NULL fields with a space, there is an alternative of seeding with a high value character (Character code 255). There is also the option of selecting a no-case sensitive sort. If the file is sorted outside of JBData any setup stored with the file may be lost (JBSort does keep the setup and should be used for large files as it will have more room for data and therefore is less likely to fail due to lack of memory). The fields used to sort the file are saved with the file on exit. If the file resides on a Flash pack then an option to abort the sort is given as the space used up on the pack will double. N.B. The sort that takes place is always an ASCII sort so numbers will not necessarily appear in the correct order (i.e. 666 will appear before 69). The sort takes no account of the length of the field. Memory Sort Shift-Psion-S ----------- This option will sort the file in memory only - the sorted items are only seen in sorted mode in the Line (or Table) mode. Any alteration to the file (i.e. Delete, Add or Edit a record) will disable the sort and a new sort will have to be made. It works in exactly the same way as the ordinary sort but leaves out the final write to disk. To inhibit the sort use Ctrl-Psion-O. If this is used then a new sort will have to be implemented if required - it does not act as a toggle. N.B. Whilst in the sort display mode many options relating to records are inhibited. This is because a look-up table is used to achieve the sort display and the program is unaware of the actual position of the record highlighted. It is possible to quick search in this mode - an ordinary search will actually disable the sort before carrying out the search. The fields used to sort the file are saved on exit. Numerical Sort - Ctrl-Psion-N -------------- A single field sort which works on numerical data has been implemented. It works in a similar way to that of the normal sorts and, using Shift as well (Shift-Ctrl-Psion-N), is also available as a memory sort. The field selected for the sort initially is the same as field one on the regular sort dialog. JBData Page 8 ---------------------------------------------------------------------- Reset Sort Fields - Shift-Psion-O ----------------- The fields used for sorting the database are saved. It you wish to reset these fields to the first three fields again (the initial option) then use this keypress combination before accessing the Sort procedure. Update Record Psion-U ------------- A record can be edited by using this function - to save the changed data press Tab when the edit is complete. Care should be taken with field types as it would be possible to input a string where a number should be. A check is made when Tab is pressed and, if a field is incorrect, the edit box will remain. Pressing Escape will abort any changes. Delete Record Psion-D ------------- Individual or marked records can be deleted using this option. The record to be deleted should be highlighted in the Line mode or displayed using the Page mode. If this option does not appear to work, press Esc and try again. If this option is accessed and there are marked records then an option to delete all the marked files is given. If 'Y' is selected then another dialog is displayed just to make sure you want to delete these marked records. There is no going back once 'Y' is pressed! Add Record Psion-E ---------- This option creates a new record. Use Tab to save the new record or Escape to abandon the creation. See Update Record for information concerning field types. You stay in this mode until Escape is pressed just like Data. Print Record Shift-Psion-P ------------ An individual record or marked record list can be printed using this option. The Print Setup (Psion-Y) should be accessed first to set up the print option as required. The record(s) will be printed in the form it is displayed on the screen. There is the option of printing the Labels as well (via a dialog) but, if in a Line display, the labels are only printed once at the start of the print. If in a Marked Record list then a dialog will be shown asking if this list should be printed. If No is selected then the highlighted record only will be printed. In Line mode the amount of data printed is restricted to what will fit on one line. This can be adjusted a little by modifying the field widths before printing as this will define the maximum length of each field to print. Remove Duplicate Records Shift-Psion-- ------------------------ It is possible to remove duplicate records using this key combination (Psion/Shift/Minus). This is a slow process and, once started, cannot be stopped. It cannot be guaranteed to work as it relies on the sort procedure. JBData Page 9 ---------------------------------------------------------------------- As only three fields can be sorted it is quite possible that duplicates may remain after the command has finished if the sort was not able to separate them. For example, if the file is sorted on the first three fields, there are three records with the same first three fields and those fields are the same but all others are different, if one of the records is a duplicate then it is possible that the sort will not put the duplicates together and the program will not be able to spot the matching records. The sort fields are those that have already been specified in a sort or, failing that, the first three fields of the record. Once the key combination has been pressed a dialog is offered giving the choice of Automatic or Manual - Automatic will carry out the procedure without further prompts, Manual will display each match in turn and ask if it should be deleted. Modify Fields Shift-Psion-E ------------- It is possible to add and delete individual fields using this command. Only one field can be added or deleted at a time though. The first option is a dialog to determine which field to choose for deletion or the position of the additional field. Any new field may be placed before or after the chosen field in the dialog. Next, if addition is required, a choice of the type of field is given (this is the usual Integer, Long, Floating Point or String choice). A further dialog then appears to make sure you wish to make this modification and only then is the data modified. In order for this operation to work there must be enough space on the drive for a duplicate file to be made - a check is made before anything happens to determine if the source file is in a Flash SSD and if there is enough space to create a duplicate file. If the conversion fails with an error that stops the program from running then the original file will be intact and there will probably be a file called JBZZ.DBF which can safely be deleted. Edit Labels Psion-L ----------- The labels as displayed can be added or edited using this option. This procedure uses the same editor as that used for records. To save the changes press Tab - use Escape to abandon this option. The type of field is shown where the labels normally appear - this is just a guide and the information contained in the labels field cannot be saved or copied. N.B. The labels are actually only updated on disk when exiting the file so changes can be circumvented by pressing Psion-Esc to quit the file. Alternatively, to update and continue within the file just use Open on the same file. Edit Widths/Line Wrap Psion-W --------------------- In Line mode the widths of the individual fields are adjustable using this option. It uses dialog boxes to display up to 5 fields at a time. To move to the next set of fields press N, use P to go to the previous selection. When the changes have been completed, press Enter. This option will only have any effect on the display in Line mode. The JBData Page 10 ---------------------------------------------------------------------- width is displayed in character units but it should be remembered that most of the fonts on the computer are proportional and the numbers shown are just a guide. In Page mode when viewing a record the line wrap can be toggled on and off using this same key combination. In Edit and Update line wrap is automatically switched off. Calculate Widths Psion-I ---------------- This option will look at each record in the file in turn and adjust the display widths of each field accordingly. It will take the record with the longest field as its base for that field. Because this procedure looks at every record, on a large file this can take some time to complete. There is a dialog confirmation that appears before the operation commences to trap unintentional keypresses. Reset Widths Shift-Psion-I ------------ Widths are reset to the default size of 20 characters for each field when this option is activated. Please note that with proportional fonts more characters than specified may be shown. Page/Line View Psion-R -------------- To toggle between the Line and Page View use this option. Page View shows one record (or as much as possible) per page, Line View shows several records per page, one per line. It is also possible to switch the Enter key to toggle as well (use Shift-Psion-R). Record Number Toggle Shift-Psion-N -------------------- This option toggles the record numbers on and off. In Line mode the record number is shown at the start of the line, In Page mode the record number and the total number of records is displayed in the bottom right hand corner. The Page and Line views status is held separately so that numbers can be displayed in one format and not in the other. Labels Toggle Psion-H ------------- Labels display can be toggled on and off using this key combination. It is operative in both Line and Page mode but the selected display is independent of the other (e.g. it is possible to have Labels shown in Line mode but not Page mode). Displayed fields Shift-Psion-W ---------------- The fields that are shown in Line mode can be toggled on and off using this command. The options are View and Hide and only the first 32 fields can be set in this way. The fields hidden in this manner relates to the position of the field and not it's name, so if, normally, the third field is called 'Phone' but has been changed to the 'Fax' field, it will be the Fax field that is hidden. The information is saved with the file. The hidden fields can be set to show all by using Shift-Psion-M. JBData Page 11 ---------------------------------------------------------------------- Displayed fields reset Shift-Psion-M ---------------------- Any hidden fields that were set by Shift-Psion-W can be reset using this command. It will make all the fields visible at once. Blank Lines Toggle/Grid Lines Psion-B ----------------------------- In Page mode blank lines can be shown or hidden using this option. To detect which method is in use, the Menu will show the opposite option to that in force. In Line mode this command will bring up a dialog box in order that you might select the visibility of grid lines for each record. In certain circumstances it is not easy to follow the individual lines or fields - this option will help. You can select a horizontal line between records and/or a vertical line between fields. The lines are shown in grey so as not to be too obtrusive and also to distinguish between frozen fields and the others. Freeze Fields Shift-Psion-K ------------- In Line mode it is possible to keep some fields always visible. The only option selectable is the end field to freeze - the first visible field will always be field 1. The next visible field is adjustable using the Left and Right cursor keys. If Freeze is selected then the next visible field position is saved in the setup record and the position restored when re-opening the database. The end of the frozen portion is displayed with a vertical black line. Re-order Fields Shift-Psion-D --------------- This command will bring up a dialog which enables the position of the fields in Line mode to be altered. A field can be displayed more than once or not at all using this method. The labels are moved at the same time. This information is saved with the file. Reset re-ordered fields Shift-Psion-L ----------------------- To reset the field display to the normal 1,2,3 etc. in ascending order, use this key combination. The data saved with the file is also updated. Toggle Symbols Shift-Psion-Y -------------- This key combination will toggle the viewing of Tabs, Carriage Returns and New Lines within Fields. The state of this toggle is remembered between edits and sessions. The old version using Shift-Psion-C still works in Edit mode - Shift-Psion-Y works in all Page modes. Dialling Psion-Help -------- It is possible to use the program in a similar way to Data and dial telephone numbers whose fields are marked with the telephone symbol. A list of telephone numbers relating to the selected record is shown. Choose one by highlighting it and select the required options given by the buttons (you can edit the data before pressing the appropriate key). The buttons are now the same as for the Data application and not reversed as in previous versions. JBData Page 12 ----------------------------------------------------------------------