AGNFILT - A Filtering Program for Series 3 Agenda Files. By Bill Pechey - July 1994 WARNING - THIS PROGRAM WILL ONLY WORK WITH SERIES 3 AGENDA FILES NOT SERIES 3A. Overview ======== This program allows a user to extract data from Psion Series 3 Agenda files for archiving or other purposes. It is much more flexible than the Tidy function built into the Agenda application. Introduction ============ I wrote this program because the Series 3 Agenda could not easily perform a function I wanted. The problem was that my agenda file was getting big and I thought it would be much better to archive old information in separate files. The Series 3 agenda has a function called Tidy which appeared to do this for me; unfortunately, it doesn't quite do it completely. The problem is that it leaves repeated items where they are rather than archiving old ones whose period of influence is over. This is a serious problem if you also run across the limit of 50 repeated items imposed by the agenda. AGNFILT was written to solve this problem but was soon expanded into a more general-purpose filter. So What Can it Do? ================== AGNFILT takes a Series 3 agenda file as input and produces an output file, called FILTOUT.AGN, in the same directory as the original, which is left untouched. The output file contains a subset of the data contained in the original file selected by various parameters. The relevant records are first selected by a range of dates and then different categories of records can be included or excluded. The categories available are: Day Notes (normal type) Day notes with repeats Timed Items (normal type) Timed Items with repeats To-do items Any combination of these can be selected. When the process is complete the program shows a set of statistics giving information about the numbers of each type of record in the input and output files. Repeated items are handled in a special way; repeats are included in the output file if their first date of occurence is before the last date of the selected range and their last date is after the first date of the range. Items which repeat forever are included if their first date comes before the last date of the range. This means that repeats may not have a date of occurence within the selected range if their repeat interval is longer than the length of the selected range (roughly speaking). It seemed just too difficult to compute all the possible dates on which a repeat item could occur and it would have slowed down the program considerably. If you worry about this you can manually delete the ones you don't like from the output file. Contents of AGNFILT.ZIP ======================= There are only two files in the ZIP archive; AGNFILT.OPO and AGNFILT.TXT (this file). Installation ============ Copy AGNFILT.OPO to a suitable \OPO\ directory and it will appear under the OPL speech bubble icon. If you have removed your icon you will have to re-install it (use Psion-J from the system screen and select RunOpl). To run the program just highlight its name and press enter. I didn't make it a full Psion application because it's not a program you need to run frequently (once a year, in my case!). Operation of AGNFILT ==================== Before AGNFILT can run successfully you must close the agenda file you want to process. Use Psion-X to do this. Once the program is running you will get selection screen 1 which asks for the name of the agenda file to process and the range of dates to include in the output file (FILTOUT.AGN). When this screen is complete you then have selection screen 2 in which you can choose which categories of records will be included in FILTOUT.AGN. When that's done the program generates the output file in the same directory as the original. While the program is running it puts a Psion symbol on the screen for each input record processed. At the end of the run the statistics screen is displayed. Open FILTOUT.AGN with the agenda application to make sure that it did what you expected. When you are happy with it, save it under some suitable name using Save As from the Agenda File menu. Alternatively, you could rename it using Psion-R from the system screen. Note that the Agenda settings, such as whether alarms are on by default, are not copied to the output file and, therefore, revert to their defaults. This is because it was too difficult to copy this information from the input file (you have to read the file twice or make the program much more complex). You can easily change the settings back to what you prefer anyway. Before running AGNFILT it is a good idea to make sure that all deleted records are removed from the agenda file by using Psion-K in the Agenda application. AGNFILT will work if you don't do this but you may be confused by the size of the output file. AGNFILT will tell you if the input file contains deleted records. You can use AGNFILT as an alternative method of compressing an agenda file by using the default start and end dates and by leaving all the filter settings at "Yes". Acknowledgements ================ I could not have written this program without the information about the Agenda file formats obtained from the Psion conference on CIX and the Series 3 SDK. In particular, an example program, READAGN.OPL, written by Psion, was extremely useful in understanding the unusual structures in AGN files. Disclaimer ========== This program should not cause damage to your precious data files; however, if it does I will not be held responsible. If you're worried, backup your data. Bugs etc. ========= If you find a bug or have any comments or suggestions about this program please send e-mail to bpechey@cix.compulink.co.uk or to 71601,2572 on Compuserve. Please distribute this program freely but do not separate the two files in the ZIP archive and do not modify either of them. Bill Pechey - July 1994.