C:\david\personal\sharewar.txt (ascii) DAVID'S MILEAGE LOG PROGRAM AUTHOR:- David Brown, 113 Fernside Road, Poole, BH15 2EN GENERAL INFORMATION:- This program has evolved since late 1994 from a Psion shareware program into its present form. The current version is MILE9cS. The S denoting Shareware version. All personal references have been removed, and the program geared to more general use, as opposed to tailored to my employers requirements. If anyone wants to customise or change the program, please send a 3.5" disk to the above address with SAE and I will send the OPL listing, programmers notes and a flowchart of the program. Any improvements/additional facilities I would be very interested in! SYSTEM REQUIREMENTS:- This program will run on a series 3a, but it was written on a series 3. It is geared to at least 128K ram, and a 128k RAM pack. 256K is the minimum total RAM required. In it's present form, it assumes it will be running from, and saving to the internal drive. The program can run from FLASH RAM, but it would have to save to RAM. It is very memory hungry!!! A full datafile (1 year) can take over 35K!! In addition to the program and the 20K (ish) requirement for Mclink! However, 256K is sufficient provided you keep your directories fairly clear! PSION link cable is required to link to PC or a printer. I load the datafile into a Windows word processor and print from there, however you can print direct to a printer - see instruction manual for this. DATA VALIDATION:- The program has proved to be very stable, with no data loss occurring (even in crashes). You can enter text and numeric characters in the vehicle registration and journey fields, but only numeric characters in the other data entry fields - the system validates for numeric characters and will not allow incorrect entry. Data entry accuracy is down to operator. However mistakes can be corrected using AMEND LOGGED ENTRY or ERASE LAST facility. LIMITATIONS:- KNOWN ERRORS:- 1 In the version number stated one known error can occur. If you use the EXPORT TO PC facility, it will crash if the hard drive does not have the directory C:\MILES\ on it! No problem is encountered with export to PC otherwise. PLEASE NOTE:- Do not use WINLINK for the file transfer link - use MCLINK as supplied with PSION link cable. PC export works seamlessly with MCLINK but for some reason wont work with WINLINK! 2. PREDICT PROCEDURE:- The figure is calculated as an average - IE it takes the number of days so far in the year, and the number of business miles to date and predicts. The start of the year figures are misleading, but the prediction gets more accurate towards the end of the year - so you can do lots of business miles if you need to! The procedure needs to work from the start of the business year to be accurate - if you start using the program half way through, the prediction will not be accurate. 3. No help file has been written - there was one for the original shareware program, but as the program has evolved I have not amended it. Therefore pressing the help button doesn't solicit help! I have instead used dialog error boxes, and "BUSY" indicators to prompt users. 4. It was assumed that the user purchased all fuel on a company fuel card, and accounted for private use, to deducted from wages (this is the way my company works). Since version 7 private fuel purchases can be accounted for, in addition to fuel card purchases, provided no more fuel than privately used is put in, as there is no carry over of private fuel surplus to next period. OVERVIEW:- It is assumed that for the majority of the time, the driver uses the one vehicle, with intermittent use of other vehicles for business purposes. It is also assumed that at the start of day the driver enters his personal mileage since the end of day the day before using the LOG procedure. This figure includes mileage to get to work. At the end of day, he enters his mileage and journey. All fuel used is also entered. At the end of the period, he EXPORTS the information, and prints out the period log. The period log is then reset for the next periods mileage logging. Similarly, at the start of a new business mileage year, he resets the main datafile. INSTALLATION:- Copy the file MILE9cS to the APP directory of either the internal drive, or RAM or FLASH RAM card. Use the Install application menu option (see PSION manual) and the icon CAR appears. When you press ENTER to start the application, it creates the four necessary files it requires in the \OPD\ directory. They are MILE9.ODB (the main years mileage log), MILETEM9.ODB (the period log file), PREDICT.ODB (if you start the log part way through the year, this file is used to have a stab at predicting your annual mileage) and SERVICE.ODB (holds details of the next service to the vehicle CUSTOMISATION:- Customisation should only be done with some knowledge of programing! See above for obtaining the opl listing. STARTING PROGRAM FOR FIRST TIME:- Press MENU and go to the SETUP option under MAIN. You will be asked for your start mileage. This procedure also writes to the Period file, so it is not necessary to Repeat the procedure for the period file. Press MENU and go to the service option. The screen is for information firstly, to amend the details press ENTER. You are prompted for the mileage of the next service, and given a choice of service type. Press enter having given the information. When you get to 1000 miles before the next service, you get a reminder of the imminence of service due before you get to the main screen. This clears once you reset the next service interval. If you go overdue, you get warnings for 1000 miles that you are overdue! LOGGING JOURNEYS:- At the end of your first day, from the main opening screen press ENTER. Type the destination of your journey and press the down arrow. The start mileage is the end mileage of your last journey - when you do an annual reset upon installation, you enter the years start mileage. The previous mileage is shown for interest, but should not be altered unless you change vehicles. Just skip past it with the down arrow on your second and subsequent journeys UNLESS YOU ARE DRIVING A DIFFERENT VEHICLE - then you enter the new vehicle start mileage. Enter the end mileage of your journey and press the down arrow. Choose Business miles or Private miles by using the left or right arrows. Press ENTER to confirm details, or ESC to abort. If you enter a finish mileage of less than start mileage, you are prompted of this, and given the chance to re enter the data, or abort procedure. The second screen of the procedure will appear. Enter the registration number of your vehicle, and press the down arrow. (When you next log a journey, the same registration appears automatically - if you have changed vehicle, enter the new vehicle, otherwise press the down arrow to leave it unchanged). If you wish to enter petrol details, use the numeric keys and down arrow. Once satisfied press ENTER and your journey is logged, or ESC to abort. Pressing ESC at this point still exits the procedure without saving. MAIN MENU OPTIONS:- Next service:- see above - the program is designed to remind you of imminent or overdue service. Part year prediction:- If you start the log half way through the business miles year, enter the year start date and miles done for business purposes, and year end date (you are prompted for the 5th April (tax year end)). The program will then have a go at using the log as you go along to predict your annual mileage. On this version, you have the option of showing the part year prediction figure in the main window. Follow the on screen prompts to set this up. When you do an annual reset, it the figure shown in the main window defaults to the predict procedure. Note that on day one of the log, the part year prediction will be any business miles done on day one, and any business miles entered as having been done earlier. The prediction routine proper starts on day two - this was done for programming reasons. Review journeys:- this facility currently will enable you to page backwards or forwards through the main datafile. The text for journey is truncated, but will print out correctly on exporting mileage. Information:- gives users my details. Quit:- exits the program YEAR MENU OPTIONS:- Export:- This saves the annual mileage log to a file called \opd\mileyr9.wrd (in some strange format but it can be converted by WordPerfect) ready for loading into a word processor or printing. The file can be looked at by the PSION word processor. PC export:- the annual datafile gets too big to export to Psion, so plug in PC link and export to PC. If the link is not established, you get an error message, and the program returns to the main menu. If the directory C:\MILES does not exist on your hard drive, the program will crash. In addition don't use WINLINK as the file transfer utility - use MCLINK as supplied with the link cable - SEE LIMITATIONS ABOVE. Totals:- gives you the mileage totals for the year to date. Setup:- At the start of the mileage year, and when you first use the program set up the main datafile, otherwise ignore this option like the plague! It also resets the period log, and part year predict. PERIOD MENU OPTIONS:- Export:- at the end of the period, export the file for printing. It saves to a file called mile9.wrd. The file can be looked at by the PSION word processor, see above year menu. Export to PC - as above. Totals:- gives you the mileage totals for the period. Setup:- having exported the periods mileage, use this option to set up the period datafile for the next period. FUEL TOTALS OPTIONS:- Year:- gives you the annual mileage and fuel consumption including MPG figure. Period:- gives all the above for the current period including how much you owe the company for private mileage MPG:- obvious! However, it uses the complete year figures, so becomes very accurate, but unlikely to change much on a day to day basis at the end of the year!. UTILITIES MENU:- Amend logged entry:- you can use this facility to correct any entry in the main datafile, and corresponding entry in period datafile. Use the left and right arrow keys to page up or down, and the up and down arrow keys to move the cursor up and down the screen. The cursor will nudge the screen up or down at the top or bottom of the screen. Press ENTER and you go to the amend details screen. Be sure to check that the details you are saving are correct - particularly the choose business or private journey, as it defaults to business!!! Press ENTER to confirm changes. You then have the option of aborting or continuing. Once you press ENTER to confirm, the entries are sorted in both files. One word of caution:- The program uses the end mileage to sort the entries - date sorting for various reasons did not work. When you alter an entry, the updated entry is saved at the end of the file, this is why the sort routine is necessary. IN VERSIONS PRIOR TO DATED 31/5/96 the situation could occur that you alter the end mileage on an entry significantly, and it then takes a higher place in the records order when sorted. The problem could occur that the period file could be out of step with the main datafile, so on altering a recent entry, different entries in each file would be altered. In this version, it checks to see if the new mileage is below the period start mileage, if so it will save to both files, if not, the period datafile is not altered. If you have used previous versions, and encountered problems, I have written routines to correct any datafile entry. Year and Period datafiles can be altered independantly. These files are available on request. Erase last:- if you make a mistake, use this to erase the last entry and retype. You can erase every single journey one by one if you require, (up to the start of the period datafile) but this is pointless. It is intended purely to correct recent mistakes. Compress data files:- should you use the amend logged entry, you can use this to compress the size of the data files. The program is of great use to me, and has proved to be very stable. I hope anyone using it finds it the same!