Bob,

I'll answer your questions briefly, but I promise that when I find the freaking 
free time, I'll spend it reconstructing my detailed instructions for creating 
Keysoft databases which I lost in an e-mail database crash...  how ironic! My 
fault, and I apologize to those who have asked me for that previously and are 
still waiting.  It's either I send it to people who need it, or maybe just help 
PDI incorporate it in the manual, aside from rewriting other parts of the 
User's Guide that is in dire need of editing.
Here goes, just off the top of my head, so I might forget something but more or 
less, this should explain things.

Line 1 must contain the word "database" (without the quotes) or the file will 
not be recognized as a valid database definition file.  Optionally, the word 
"database" may be followed, on the same line, by the name of the .cdb file 
which will be created in association with that definition file.  Thus, it could 
be any name, even different from the name of the definition file, but of course 
consistency is recommended.  If you do not write anything after the word 
"database", then the name of the definition file will automatically be the name 
of the associated database.

Line 2 must contain any number, two-digit I believe but I haven't checked.  
It's a number assigned to databases when using other programs for compatibility 
purposes, but in Keysoft, it has no use.  However, the second line of the 
definition file must contain a number; otherwise, you'll get an error referring 
to line 2.

The numbers at the beginning of every line describing fields is just an 
identification number.  It's possible values are between 1 and 65535, 
inclusively.  Note that those you see in the current Keysoft definition files 
are random, and they do not have to be consecutive or five digits long.  Just 
make sure you do not repeat the same number for two lines, because these 
numbers are there to distinguish each field line.

On the same line describing the field, the identification number is followed by 
the field type.  This lets Keysoft know how to treat the information entered 
into the field.  Examples that can be seen in Keysoft databases are the types 
called time, date, timeanddate, boolean and udword.
For example, you wish to have a definition file with a birthday field.  The 
correct field type to use is "date" (without the quotes).  In such a field, you 
can just enter the birthday of a person, say, "January 12, 1980" (write as is, 
but without the quotes), and when you hit ENTER, then view the field entry, it 
would say, "Saturday January 12, 1980", that is, the day of the week on which 
that date fell had been determined.  Also, the field type "boolean" 
characterizes the field as having only two possible values for entries, like 
yes or no (see the definition file for the Directory of Services as an example).
Some fields do not have a specified field type.  If none is written, then the 
general field type "string" (having up to 250 characters) is assumed.

The next part of a field line is called usage.  Examples of this are Name 
(which will cause abbreviations like D R to be read as "doctor", not "drive"), 
address (which will cause abbreviations like S T to be read as "street", not 
"saint"), state (which will tell the BN to read the letters entered as their 
expanded name, say "Ks" will be "Kansas"), phone (which will make the BN read 
the numbers like a telephone number), spell (which is used for fields 
containing numbers or letters or combinations of these, so that the entry will 
be spelled out, instead of read, see zip code field as an example), etc., etc.
If no usage is specified, then the "general" usage (meaning, the entry will be 
read as it would be anywhere else in Keysoft) is assumed.  See the web address 
field as an example.

The fourth part of a field line is the modifier.  This is optional.  Examples 
are autocap (which automatically capitalizes the first letter you type), 
autonum (which automatically puts a number sign so you don't have to type dots 
3-4-5-6, but can just go ahead and type the numbers using the upper part of the 
cell, unless the Braille grade, explained below, is set to computer Braille), 
and allcaps (which will automatically capitalize all the letters you type).

The fifth part of a field line is the Braille grade.  Those that you can write 
are G2 (for contracted Braille), G1 (for uncontracted Braille), and G0 (for 
computer Braille).  This would control the Braille grade for typing in entries, 
but with the e-mail database definition file, since most are fields with e-mail 
as the usage, entries are still in computer Braille (which is the default for 
that field usage), yet will be displayed in grade 1 or 2 Braille (whichever you 
specify) when the headers are viewed in Keymail.

The sixth part of a field line is what you see within quotation marks.  This is 
the prompt, giving you the field name when you access the selection list for 
fields in Keylist.  They must be between quotes, and should only be a certain 
number of characters in length; I cannot remember exactly right now, but if 
memory serves, it's 24 characters, not including the colon automatically 
appended to the prompt.

The seventh part is again optional.  This is called the default value of the 
field.  It is entered in the format d="value" where value is whatever entry 
will be automatically entered or selected (say, y or n for boolean type fields) 
when you create a record.  The value must be written between quotes and can 
only be 50 characters long.  For an example, look at the definition file for 
the Directory of Services.  This is how you can make a Reply-To address appear 
on every e-mail you compose in Keymail.

The eighth part, Help Message, is again optional.  This is written between 
quotes.  Examples can be seen in the password fields in the Directory of 
Services definition file.  You can use this if you want to be reminded about 
what to type or how to enter information into a field.  This is accessed when 
you press SPACE with H (HELP key) for the context-sensitive help while you are 
on that field, and your help message will be announced or appended to the 
default Keysoft help message.

Other parts of a definition file are the sort order, announcement order, and 
concatenation (concat) lines.  Concat lines will help define how fields are 
referred to in the sort and announcement order lines.  For the concat lines, 
their identification number must be 24594 (if the information is accessed in 
the Keylist menu) and 24595 (if the information is accessed in Keymail).

Parts of a field line must be separated by a comma and space.  Remember to 
select Keylist definition file as the file type to create, because such files 
are not just text documents, but have the .klt extension.

Note that this is not a complete explanation of the syntax and structure of 
databases used in Keysoft.  There are other field types, usage, and modifiers.  
Further, there are other things that need to be noted as well, regarding the 
function of these parts.
This is what I'll explain thoroughly when I get the chance to sit down and 
finally rewrite my instructions.  I just answered your questions to satisfy 
your curiosity, and to make sure people on this list will not get the 
impression that the instructions for creating databases in Keysoft are a 
complete mystery.  Someone just has to find the time to study it and document 
his/her findings.

HTH,
Roselle

>----- QUOTED MESSAGE -----
>Sent by: bob <[EMAIL PROTECTED]

>Hi Listers and (especially PDI):
>Please excuse the length of this message, but I've got many questions and few 
>answers.
>I am trying to figure out what goes into constructing databases.  I think 
>there are a lot of uses we users could make of databases (i.e.  a database of 
>books we've downloaded, and a database of helpful hints we learn from this 
>list, just to name a few.

>Last year on this list, we were promised more definitive information about 
>databases in the keysoft v5 manual, but all we got was a rehash of the 
>information in version 4 relegated to the appendices.
>Be that as it may, let's examine existing databases and see what can be 
>deduced.  First off, I'll use the address list database as a template for my 
>deductions and questions.



Reply via email to