FNDDOC.DO by James Main Kenney 1996 Documentation for FNDALL.BA, a program to search for multiple strings in multiple text files. FNDALL.BA runs on the following Kyocera-made notebook computers: Tandy Radio Shack TRS-80 Model 100, Tandy 102, Tandy 200, NEC PC-8201A and NEC PC-8300. FNDALL.BA displays and optionally saves to a file the name of each file containing one or more of the entered strings. Each filename is followed by the strings contained in that file. Only one occurance of a particular string in a file is noted: when a match is found, FNDALL.BA then looks for the next string. Up to 80 strings may be searched for, with a maximum total of 240 characters (including double spaces added between strings by the program). FNDALL.BA can search files in computer RAM, in Booster Pak RAM, on TPDD disks, or on tape. The name of a file to be searched can be directly entered, or the name of a file listing the names of files to be automatically searched can be entered; this file list need not have a special format, but for a filename to be recognized as such it must have a period (even if it has no extension) and its ends must be delimited by characters not used in filenames, such as spaces, parentheses, quotes, slashes, or punctuation marks. (These delimeters may be changed by editing line 4.) An attempt is made to open a file for each "reasonable" name (one to six acceptable characters before a period) that appears on the list, and error trapping is used to recover if the file does not exist in the place specified by the file path. A directly entered filename need not have a period or extension, and may even have an illegal extension. Whether a filename is entered directly or extracted from a file list, the original extension is replaced by ".DO", so that a list of programs with, e.g., .BA or .CO extensions on the filenames may be used to prompt a search of the ASCII text (.DO) versions actually in RAM. This also insures that the names in the data file will always have .DO extensions, for clarity. (FINDALL, for MS-DOS computers, searches all file types, including Kyocera produced .BA and .CO files.) If a data line exactly duplicates a line already in the data file, then the new line is not appended. Repeating the search at a later date for the same strings, entered in the same sequence, will therefore add data lines only for new or altered files (below a new header, with date and time, etc., where they are easily found). The Boolean conjunction ("and") can be implemented by using the data file produced by searching for one string as the filename file when searching for a second string: only the names of files containing both strings will appear in the second (new) data file. Simple Boolean searches can be done more easily, however, by a simultaneous search for all strings followed by a visual comparison of the strings found in each file. Operating instructions: ---------------------- (Note that the Tandy ENTER key referred to below is equivalent to the NEC hooked-arrow return key.) At the first prompt, enter the strings to be searched for (press ENTER after typing each string, e.g., a word or several words to be searched for as a group). After each entry the prompt will reappear, allowing the next string to be entered, unless a null entry is made by pressing only ENTER, which will terminate string entry. At each recurrance of the string prompt, a list of the strings entered to that point is presented, and a notice is given of the maximum number of characters permitted for that string (240 initially). This number may be shared by subsequent strings, but each string requires a two-byte overhead for two spaces inserted between strings by the program. A minimum of three bytes per string is therefore used, limiting the number of strings to eighty (hence the array dimensioning). (Added to the maximum filename length of 12 characters and the last double space, this 240 byte total length meets the 254 character limit for the LINEINPUT statement used in checking for duplicate lines.) At the second prompt, enter the name of a file to which the data will be appended, or press only ENTER if a permanent record is not desired. At the third prompt (which follows a display of the files in RAM), enter the name of a file listing the names of files to be automatically searched, or press only ENTER if filenames are to be directly entered at a later prompt. At the fourth prompt, enter the path (a term borrowed from MS-DOS and used in FINDALL) for the files to be searched, or press only ENTER if they are in computer RAM. If a Booster Pak is attached, enter the path "R:" to search files in Booster Pak RAM. For the 200 KB Tandy Portable Disk Drive 2, enter the path "0:" or "1:" to search disk files in the desired bank (use only "0:" for the original 100 KB TPDD); this requires TS-DOS or the Booster Pak. For a cassette drive (untested), enter the path "CAS:" to search tape files. The colon is optional: FNDALL will append one if the path is entered without it. A caption header is then displayed above where the filenames and strings will appear, and is also printed to the data file (below date, time, list filename, file path, and strings searched for) if one was named at the second prompt. If no list file was named at the third prompt, the direct-entry prompt "File to search?" will now appear; enter a filename or press only ENTER (or F8 on a Tandy or SHIFT-f5 on an NEC) to exit to Menu. If a filename is entered, this prompt will reappear after the file is searched (a frequently lengthy process, hence the beep!), facilitating rapid entry of the next filename. If a list file was named at the third prompt, the automatic searching of files whose names are extracted from the list will now start, the results of which are displayed. After the files are searched there is a beep, and return to Menu is automatic. For either the direct or automatic entry of filenames, the message "(file not in path)" will appear on the screen in place of data for names not corresponding to existing text files in the selected path. The message "(duplicate line)" below a line of data indicates that this line was not appended to the data file because an exact duplicate is already in the file for that exact filename.