"filespec" is file specification to add to the data base. It can include drive
and path information as well as wildcards if desired.
"/Xfilespec" is one or more file specifications that you want excluded from the
search. For example, you could say "*.* /X*.EXE" which would process all files
except for those with an EXE extension.
"/S" says you want the files in this subdirectory and any child subdirectories.
This allows you to search the entire disk, for example, if you'd like to.
"/FN" says that the file description to be shown by ISAMFIND.EXE is the file
name itself. This is the default if no file description is explicitly provided
and neither /L1 or /SPLIT=string are provided.
"/L1" says that the file description to be shown by ISAMFIND.EXE is the first
line of the file. This is the default if no file description is explicitly
provided and /FN is not specified but /SPLIT=string is. If the file description
is entered as "*", /L1 is again the default.
ISAMMAKE.DOC 3 Revised: 09/09/95
"/SPLIT=string" specifies that the text file to be read actually consists of
several component pieces, each of which is to be indexed separately. When the
file is searched by ISAMFIND, ISAMFIND will try to display the specific
component that you requested but this option is usually only available if you're
using the READY.EXE program (which supports viewing portions of file) as your
default file viewer. The split string itself might be something like
"/SPLIT=</TITLE>". If specified, /SPLIT=string has to appear at the end of the
control line.
For example, you can create a massive text file that has all of the help files
you want to process concatenated together. The caveat here is that you have to
specify a /SPLIT=string parameter for the file. For example, let's say you have
a control file (which is actually ISAMDEMO.LIN in the sample files provided with
the ZIP) that looks like this:
</TITLE>
This is the first item in a multiple-entry file. You will notice that
each block of text begins with a /TITLE string surrounded by "<" and ">"
characters. (I don't actually include the exact text here because that
would cause ISAMMAKE to parse this entry as being multiple items.
</TITLE>
This is the second item in a multiple-entry file. There are some random
words that might be found in a random search if you follow the example in
the documentation: house demonstration Bruce Guthrie wishes you the
best of luck.
</TITLE>
This is the third item in a multiple-entry file. I'm not going to include
as many words here but you might want to put some in anyway.
Each separate item within the file begins with a string "</TITLE>". You can
parse this file as being three separate entries as far as ISAMMAKE/ISAMFIND are
concerned by including "/SPLIT=</TITLE>" in the control file after the file
description. You can also parse every line of a file into separate entries by
saying something like "/SPLIT=\013\010"; see the decimal and hexadecimal coding
information sheet at the end of this documentation. If your /SPLIT parameter
includes spaces, you must use \032 or &H20 instead of the space.
"desc" is typically the file description unless /FN or /L1 are in effect. In
that case, this field can contain comments (which are ignored). For example:
*.DOC /FN Grabbing all of the documentation files
will describe each file as being the file name itself and the string "Grabbing
all of the documentation files" will be ignored.
Comment lines are any lines beginning with any of the characters in the
/SKIP=string parameter. The default SKIP request is "/SKIP=;"; any line
beginning with a semi-colon in skipped.
ISAMMAKE.DOC 4 Revised: 09/09/95
Okay, so that handles the simplest control file. Now, what parameters do you
have to provide the ISAMMAKE.EXE command itself?
First off, you have to tell it the data base name that it will be building. This
is called the "corename" and can consist of a drive, path, and up to eight
characters. The corename cannot include a file extension as one will be
provided for you.
It's easiest if your control file is the same as the corename with an extension
of *.CTL. This name (corename.CTL) is the default value for the control file.
So the minimum information that you need to provide in creating your
ISAMMAKE/ISAMFIND data base is the corename parameter. This is specified using
"/Fcorename". In our case, if the control file was called CD.CTL and we wanted
the data base to be created with the corename of "CD", we could invoke the
ISAMMAKE and ISAMFIND commands using just one parameter:
ISAMMAKE /FCD
and to search the data base:
ISAMFIND /FCD
There are of course other parameters allowed by both commands and they are
explained later in this documentation and in the ISAMFIND.DOC file.
Two different types of control files:
ISAMMAKE supports two types of control files:
(1) /C=L: The control file that was demonstrated above (CD.CTL) is a simple
filelist control file. This is the default for the ISAMMAKE program.
(2) /C=F: This is similar to /C=L except the control file consists of a list of
control file specifications, each of which can be in /C=L format shown
above. This is frequently used if you have a number of control files that
are grouped and you might want to group them differently for different
applications (e.g. some people only see certain help files, others see them
all).
ISAMMAKE.DOC 5 Revised: 09/09/95
Output files:
ISAMMAKE.EXE creates two output files based on the /Fcorename specification. The
first file is an ISAM format file. The second is an ASCII-delimited list of
data sets in that file.
Note that a characteristic of an ISAM file is that the minimum file size is 64K
and that size increases are made in 32K increments. The only way to allow
multiple users to access the ISAM file is to mark it in DOS as "read only". This
means that in order to delete the file, you have to use the DOS ATTRIB command
to reset the file attribute. Only then can you delete the file:
ATTRIB corename.ISA -R
DEL corename.ISA
corename.ISA: Two ISAM data bases are actually created in one physical file.
One tells the program which files have been indexed and contains includes
information about the size of the file and how many words were in it. The
second data base contains all words above the minimum length cut-off.
corename.PRN: An ASCII-delimited file which indicates which files have been
indexed. Sample records are as follows:
3,"C:\VBDOS\ISAMDEMO.003","94-11-05","01:16",56,10,"",1,1,1,"The house was four stories high"
1,"C:\VBDOS\ISAMLIN1.DAT","95-09-03","13:07",161,13,"",1,1,1,"This is a sample file with some records each line of which is being treated as a separate entry"
1,"C:\VBDOS\ISAMLIN1.DAT","95-09-03","13:07",161,6,"",2,2,2,"That are on multiple lines and might be"
1,"C:\VBDOS\ISAMLIN1.DAT","95-09-03","13:07",161,3,"",3,3,3,"useful to check into"
2,"C:\VBDOS\ISAMLIN2.DAT","95-08-14","20:01",229,10,"",1,1,3,"This is another set of records"
2,"C:\VBDOS\ISAMLIN2.DAT","95-08-14","20:01",229,15,"",2,4,7,"And the second record is here"
2,"C:\VBDOS\ISAMLIN2.DAT","95-08-14","20:01",229,7,"",3,8,9,"And another one! Are we excited or what?"
The fields are as follows:
1 docnum (records sorted by document name)
2 "filename" (full document name)
3 "filedate" (document creation date in yy-mm-dd format)
4 "filetime" (document creation time in hh:mm format)
5 filesize (size of the file in bytes; is size of entire file if
multiple-entry file)
6 filewords (number of words in the document)
7 "dirarea" (file area /AREA=whatever or from /C=F information)
8 splititem (sub-entry of item for a multiple-entry file)
9 splitline1 (first line of file for multiple-entry file)
10 splitline2 (last line of file for multiple-entry file)
11 "filedesc" (document name)
ISAMMAKE.DOC 6 Revised: 09/09/95
Specifying parameters:
Parameters for this program can be set in the following ways. The last setting
encountered always wins:
- Read from an *.INI file (see ISAMFIND.DOC file),
- Through the use of an environmental variable (SET ISAMFIND=whatever), or
- From the command line (see "Syntax" below)
The ISAMFIND.INI file:
See ISAMFIND.DOC documentation.
Quick demo:
Okay. So you've got this program in your hot little hands and you want to see
what it can do for you. Easy enough. There's a batch file ISAMDEMO.BAT that
will build a data base for you and search it for something in it.
The demo presumes you have my own READY.EXE text file viewer in your path.
READY.EXE is totally free and is included in the distribution ZIP file.
Run the batch file and, when prompted, key in "house" as the word you want to
see. The program will display a list of file names which contain the word
"house", listing the "best" documents first. View one or more of the files. Try
some other words that might be in the file, like "Bruce Guthrie".