Documentation for SEARCH.BAS Ver 1.0 by David Fuller Warwick, R.I. *---------------------------------------------------------------------------* SEARCH is a Basic program written to allow easy access to all RANDOM files by means of a search and (or) report. It does not matter whether the file is an ISAM file or not. All that is needed is a file with a ".BSI" extension which contains the MAPPED variables for the file that is to be searched. The file name and record size are kept in DATA statements at the end of the program along with descriptions that are displayed in a selection menu. All files are opened with a 512 record size and read as unformated (`X') data. The information is then converted to the format specified by the MAPPED statements in the INCLUDE file. The user is prompted for search criteria which can be select on one or all fields. Operators are also allowed. The user can then select output to the screen or printer. Printed reports can be saved and recalled and are automatically sorted by the first fields selected to be printed (up to three fields sorted). The program converts binary and floating point numbers and will sort by those fields if selected. The user will be promted to enter the number of decimal places for each numeric field on the report. I have found many uses for this program. We are using a modified version of Alph Accounting and there are many files which do not have report generators associated with them. It is also handy for backup files if you need to see some piece of imformation but do not want to restore the whole file. Many files contain link fields or counters that are not diplayed on the screen but are stored in MAPPED variables. Its nice to be able to see the information they contain without having to write a program to do so. MAPPED variables can be very complicated and this program will be able to understand most normal file structures including arrays. Unformated fields are ignored but the space they take up is not. First and second level arrays are handled but if some crazy programmer has constructed third level arrays they will not be interpreted properly. The ORIGIN symbol `@' will also be handled properly allowing the user to see the original variable contents. The user INPUT routines in this program uses Micro Sabio's INFLD.SBR which has been renamed to INPUT.SBR. The INPUT.SBR came with our Alpha Accounting package. The INFLD routine adds a lot more features such as preloading and displaying defalt entrys, function key interpretation, timer functions, and formated output. If you don't have either of these routines this program will not run. To use this program simply put the names of the files you want to access in DATA statements at the end of the program using the same format as the samples already included and compile the program. If printed reports are selected, SEARCH will create SRCH.SRT which will be used to sort the report and SRCH.RPT which is the actual file that will be sent to the spooler. The report format is saved ina sequential file with an ".SRP" extension added to the file name give by the user. Because this program reads every record in the file the process can be a little slow on some files. The routines in the program that do most of the work have been put at the beginning of the program so it will run faster. I would like to thank James A. Jarboe who wrote VUERAN.BAS because I have used his program for quite a while and it has allowed me to fix and (or) save a lot of screwed up data over the last couple years. I also learned from his program how to read all files with 512 record size regardless of the size if the records stored in them and how to convert unformated binary and floating point information to thier values. I had a lot of fun writing and debugging this program. I hope all the little insects are gone. Please give me some feed back about this program, good or bad. I'm always willing to make modifications to suit someone elses needs. David Fuller PO Box 8767 Warwick, R.I. 02888 401-467-2900 .