INTRODUCTION                                         
                                                     
"odd" is an easy to use program that provides several
utilities often not included in many dBASE compatible
database programs and applications.  These utilities 
include: Optimal database size analysis, duplicate   
and non-duplicate record checking, and distribution  
analysis.  All can be executed with a filter         
(selected search criteria) applied.                  
                                                     
"odd" does not alter database information in any way.
All database modifications must be made in the       
original application or database program.            
                                                     
                                                     
Optimal Size Analysis                                
---------------------                                
The optimal database size analysis feature simply    
scans the database and reports the maximum amount of 
field usage for character and numeric fields.  It is 
a useful aid for report generation and database      
structure modifications.                             
                                                     
                                                     
Duplicate and Non-Duplicate Record Reporting         
--------------------------------------------         
The duplicate and non-duplicate record reporting     
feature enables you to find duplicate records and    
non-duplicate records through a menu-created "key".  
The duplicate key can be all or part of a field(s),  
and can be issued phonetically (sounds like).  For   
convenience, the "key" can be saved and then recalled
with a single keystroke.                             
                                                     
                                                     
Distribution analysis                                
----------------------                               
Distribution analysis is an indispensable tool for   
many users but is unfortunately not included in many 
packages.  The distribution analysis has two modes of
operation: Manual and auto.  In the auto mode, the   
frequency distribution of numeric, date, and         
character fields can be generated with minimal       
keystrokes.                                          
                                                     
The manual mode has the same functionality as the    
auto mode but also allows the user to customize the  
partition sizes and use dBASE expressions.           
                                                     
Each mode reports basic statistics such as total,    
average, min, max, variance, and standard deviation. 
Some non-standard (but interesting) statistics are   
also reported.  Distribution analysis keys can be    
saved and then recalled with a single key stroke.    
                                                     
                                                     
                                                     
1 - INSTALLATION                                     
                                                     
The setup for "odd" is easily performed.  You may    
change the data path (that's where "odd" searches for
database files), the default database extension, the 
screen color, the screen update speed, the printer   
port and chose to analyze or ignore deleted records. 
Most users will only need to modify the data path.   
"odd" saves the changes you make.                    
                                                     
Select "Change System setup" from the main menu to   
display the system setup menu.                       
                                                     
                                                     
Changing the Data Path                               
----------------------                               
The data path is the drive and directory combination 
that "odd" searches when trying to locate database   
files.                                               
                                                     
To change the data path:                             
                                                     
1.  Select "Change data path" from the "System setup"
    menu.                                            
2.  Supply the new data path, including the drive    
    designation (A:, B:, etc...), and press ENTER to 
    continue.                                        
                                                     
                                                     
Changing the Database Extension                      
-------------------------------                      
The database file extension that "odd" uses to locate
database files can be modified so that applications  
that use a dBASE III file format but name their files
with an extension other than .DBF can be used.       
                                                     
To change the database extension:                    
                                                     
1.  Select "Change database extension" from the      
    "System setup" menu.                             
2.  Supply the new database extension and press      
    ENTER.                                           
                                                     
                                                     
Changing the Screen Color                            
-------------------------                            
"odd" supplies two different color schemes           
(monochrome and color - big deal, huh!).  Note that  
you may select the monochrome option from the DOS    
command line by typing "odd MONO" and pressing ENTER.
Don't type the quotation marks.                      
                                                     
To change the screen color:                          
                                                     
1.  Select "Change screen color" from the "System    
    setup" menu.                                     
2.  Select the new screen color.                     
                                                     
                                                     
Changing the Screen Update Speed                     
--------------------------------                     
Some systems are susceptible to screen snow.  "odd"  
provides this option to eliminate the snow.          
                                                     
To change the screen update speed:                   
                                                     
1.  Select "Change screen update speed" from the     
    "System setup" menu.                             
2.  Select the slow speed if your monitor is         
    susceptible to screen noise, otherwise select the
    fast update speed.                               
                                                     
                                                     
Selecting a printer port                             
------------------------                             
This is the place where you can tell "odd" what      
printer port to use.  If you send your output to a   
"COM" output, you'll need to issue the appropriate   
DOS MODE command before using this package.          
                                                     
To select a printer port:                            
                                                     
1.  Select "Select printer port" from the "System    
    setup" menu.                                     
2.  Select the appropriate printer port.  Note that  
    LPT1: is the same as PRN:.                       
                                                     
                                                     
Analyzing or Ignoring Deleted Records                
-------------------------------------                
You may chose to analyze or ignore deleted records.  
dBASE compatible files simply mark records as deleted
to help save the time that would otherwise be spent  
re-writing databases every time a deletion were made.
Most packages have a "Pack" command that can be used 
to eliminate the deleted records.                    
                                                     
To analyze or ignore deleted records:                
                                                     
1.  Select "Analyze/Ignore deleted records" from the 
    "System setup" menu.                             
2.  Select the appropriate option and press ENTER.   
                                                     
                                                     
                                                     
2 - SELECTING DATABASE FILES                         
                                                     
The database files displayed when the "Select        
database file" option is activated from the main menu
depends on the data path and database extension that 
were set up in the "System setup" option.  If you    
don't see your database file in the displayed window,
review the data path and database extension options  
in the "System setup" area.                          
                                                     
To select a database file:                           
                                                     
1.  Display the available database files by selecting
   "Select a database file" from the main menu.      
2.  Select the desired database file by positioning  
    the menu bar to the desired file and pressing    
    ENTER.                                           
                                                     
                                                     
                                                     
3 - VIEWING DATABASE FILES                           
                                                     
You may view any active database file by selecting   
the "View Database option from the main menu.  This  
option displays all records regardless of the        
"Analyzed/Ignore deleted records" setting.  When a   
record has a deleted status, it will be indicated by 
"Del" in the status bar at the bottom of the screen. 
                                                     
If a filter is active the size of the view window is 
decreased.  This action is taken to remind you that a
filter is active and to decrease the amount of time  
it may take to display filtered records in large     
databases.  You may disable the filter by pressing   
F5.                                                  
                                                     
The following keystrokes control the "view" screen:  
                                                     
F8          - Goto record                            
Up arrow    - Previous record Down arrow  - Next     
record                                               
Left arrow  - Go to previous column                  
Right arrow - Go to next column                      
PgUp        - Display previous page of records       
PgDn        - Display next page of records           
Ctrl-PgUp   - Go to first record                     
Ctrl-PgDn   - Go to last record                      
Home        - Go to left most column on screen       
End         - Go to right most column on screen      
Ctrl-Home   - Go to first column                     
Ctrl-End    - Go to last column                      
Ctrl-right arrow - Pan to right                      
Ctrl-left arrow  - Pan to left                       
                                                     
                                                     
4 - CREATING A FILTER  (SEARCHING)                   
                                                     
By creating a filter, you can limit the records      
available for viewing and analysis to those that meet
a desired search criteria.  Creating a filter can be 
a very powerful tool and one that should be fully    
exploited.                                           
                                                     
There are two methods available for creating a       
filter.  The first is a menu-driven method and the   
second is a command line method.  When using either  
method, the created filter may be saved for later    
use.                                                 
                                                     
                                                     
Menu Driven Filters                                  
-------------------                                  
The menu-driven method is easy to use and is         
completely menu driven.  You may use upper or lower  
case letters when specifying the search data; the    
search is not case sensitive.                        
                                                     
The search selection can be compounded up to 7 times 
using the .AND./.OR. compounding statements.  When   
".OR." is used, either selection criteria must be    
found in a record to have a match.  When ".AND." is  
used, both selection criteria must be found in a     
record to have a match.  Statements separated by     
"AND" are evaluated first.                           
                                                     
"odd" allows many types of operators to be entered,  
most are probably familiar but some may need an      
explanation.  If the "=" operator is selected,       
character type data (not numeric or date) is compared
in a left to right fashion in the specified field.   
For example, if the search criteria had been entered 
as CODE=abc and the field "CODE" contained "abcd"    
then a match would occur.  Use the "==" operator to  
find exact character strings.  The "$" operator      
searches for character substrings.  For example, "bc"
is a substring of "abcd" but "bd" is not.            
                                                     
Examples of filters can be found at the end of this  
section.  If you are still not sure how filters work,
experiment with the SAMPLE database.                 
                                                     
To generate a menu-driven filter:                    
                                                     
1.  Start the filter procedure by selecting "Filter  
    the database" from the main menu and then select 
    "Create a filter using menus".                   
2.  Position the menu bar to the desired search field
    and press ENTER.  Keep an eye on the search      
    sequence being displayed as you created the      
    filter, it will help you understand how the      
    search will be performed.                        
3.  Position the menu bar to the desired operator and
    press ENTER.  The substring operator can only be 
    used with character fields.                      
4.  You may now save the filter or begin searching by
    selecting the appropriate option from the        
    displayed menu.  If you desire to create a       
    compound filter, select a compound operator      
    (.AND./.OR) and return to Step 2.                
    If you decided to save the filter, enter a       
    description of the filter and press ENTER.       
                                                     
                                                     
    Here's a tip:                                    
                                                     
    Blank fields can be found by: selecting the      
    field, selecting the "==" operator, leaving the  
    entry field blank, and executing the search.     
                                                     
                                                     
Command Line Filters                                 
--------------------                                 
Using the command line entry method you can create   
complex filters that may not be produced using the   
menu-driven method.  You may use any of the functions
listed in APPENDIX A when creating a filter.  The    
only rule is that the filter must return a logical   
response.  For example, the statement RECNO()>5      
(that's record number greater than 5 in English)     
returns a logical response.                          
                                                     
To create a command line filter:                     
                                                     
1.  Start the filter procedure by selecting "Filter  
    the database" from the main menu and then select 
    "Create a filter using dBASE language".          
2.  Enter an expression that returns a logical       
    response.                                        
3.  You may now save the filter by pressing F10 or   
    begin searching by pressing ENTER.  If you       
    decided to save the filter, enter a description  
    of the filter and press ENTER.                   
                                                     
                                                     
Recalling stored filters                             
------------------------                             
You can execute, edit or delete a filter that was    
saved.  In all cases, the stored filters must first  
be displayed by selecting "Filter the database" from 
the main menu and then selecting "Recall a stored    
filter".                                             
                                                     
To execute/edit/delete the filter:                   
                                                     
1.  To execute the filter, position the menu bar to  
    the desired filter and press ENTER.  Then        
    press"Y" or "N" to the count matches prompt.     
2.  To edit the filter, position the menu bar to the 
    desired filter and press F10.  Edit the          
    description and/or filter and press F10 to save  
    the changes.  Press ESCAPE to abort editing.     
3.  To delete the filter, position the menu bar to   
    the desired filter and press F8.  Press "Y" or   
    "N" in response to the accidental erasure prompt.
                                                     
                                                     
Search Examples                                      
---------------                                      
The following is the example database:               
                                                     
                                                     
#  LASTNAME   FIRSTNAME   STATE   DATE_IN    AMOUNT  
                                                     
1  Abbey      Michael     MA      10/05/88   10.00   
2  Carson     Susan       CT      10/05/88   20.00   
3  Dempsey    John        CT      10/05/88   30.00   
4  Jones      Alicin      CT      12/05/88   40.00   
5  Nelson     George      MA      12/05/88   40.00   
6  Smith      Robert      ME      12/05/88    0.00   
7  Williams   Jean        ME      12/05/88    0.00   
                                                     
                                                     
Search Selection                      Records Found  
---------------------------------     -------------  
Search for LASTNAME >= D              3, 4, 5, 6, 7  
Search for LASTNAME > D .and.         4, 5, 6        
           LASTNAME < W                              
Search for LASTNAME < D .and.         1, 2           
           LASTNAME > W                              
Search for STATE = M                  1, 5, 6, 7     
Search for STATE == M                 None           
Search for STATE == ME                6, 7           
Search for FIRSTNAME == John .or.     2, 3, 4        
           STATE = CT                                
Search for DATE_IN > 10/05/88         4, 5, 6, 7     
Search for DATE_IN >= 10/05/88        All            
Search for LASTNAME[substr] a         1, 2, 7        
Search for AMOUNT <> 0.00             1, 2, 3, 4, 5  
                                                     
                                                     
                                                     
5 -  OPTIMAL AND NON-OPTIMAL DATABASE STRUCTURE      
     REPORTING                                       
                                                     
                                                     
Optimal and non-optimal reporting                    
---------------------------------                    
The optimal database structure reporting feature     
provides a capability that is all too often omitted  
in dBASE compatible filing programs and applications.
This option scans the database and reports the       
maximum amount of field usage for character and      
numeric fields.                                      
                                                     
Knowledge of the optimal field sizes is a useful aid 
when reports need to be generated or database        
structure modifications are to be made.  The non-    
optimal selection simply reports the current data-   
base structure.                                      
                                                     
If you need more information about the amount of     
field space utilized in each field, see SECTION 7,   
Distribution Analysis.                               
                                                     
To report the structure or optimal structure of the  
database:                                            
                                                     
1.  Select "Report the structure" from the main menu 
    to report the present structure of the database. 
2.  Select "Report optimal structure" from the main  
    menu to report the optimal structure of the      
    database.                                        
                                                     
                                                     
                                                     
6 - DUPLICATE (and NON-DUPLICATE) RECORD SEARCHING   
                                                     
The duplicate and non-duplicate record reporting     
feature will help you locate duplicate records and   
verify the expected non-duplicate records through a  
menu-created "key".  The duplicate key can consist of
all or part of a field(s).  In addition, a phonetic  
search option can be applied to either all or part of
a field.  Phonetic search is the same as "sounds     
like" searching.  For example "SMITH" sounds like    
"SMITHS"                                             
                                                     
When using phonetic searching be forewarned that if a
numeric element exists in the field or portion of the
field that is being examined, the phonetic search on 
that field is not applicable.  If that does occur    
however, it will be reported to you.  Numeric        
elements are digits 0-9 and ".".                     
                                                     
The use of the non-duplicate search option is useful 
for reporting the different groups that exist.  For  
example, perhaps you expect 1 of 5 possible states in
the "STATE" field.  You can use the non-duplicate    
search option to verify that only 5 states are       
reported.  In addition to reporting the number of    
different groups, the number of records in each group
is reported.  This feature is good for finding data  
entry errors and reporting group distributions.      
                                                     
Both duplicate and non-duplicate record searching are
performed on a non-case sensitive basis.             
                                                     
To perform a duplicate or non-duplicate search:      
                                                     
1.  Select "Duplicate record search" from the main   
    menu.                                            
2.  Select the key field you which to check.         
3.  If a character field was selected you may then   
    select to analyze: 1) The entire field,  2) A    
    portion of the field,  3) The phonetic equivalent
    of the entire field, or 4) The phonetic          
    equivalent of a portion of the field.            
    Select the desired option.  If you select to     
    analyze only a portion of the field, enter the   
    starting and ending positions and press F10 to   
    continue.                                        
4.  You may now execute a duplicate search, execute a
    non-duplicate search, compound the search, or    
    save the duplicate key for later use.  If you    
    desire to save the key, select that option, enter
    a description and press ENTER to save.  If you   
    desire to use more than 1 field to decide whether
    a record is a duplicate or non-duplicate, then   
    select the compound option and repeat the        
    process.  Execute a duplicate or non-duplicate   
    search by selecting the respective option from   
    the displayed menu.                              
                                                     
                                                     
                                                     
7 - DISTRIBUTION ANALYSIS                            
                                                     
                     20                              
                     ████ 15                         
           10   10   ████ ████                       
           ████ ████ ████ ████ 8                     
      5    ████ ████ ████ ████ ████ 5         3      
 0    ████ ████ ████ ████ ████ ████ ████ 0    ████   
 ████ ████ ████ ████ ████ ████ ████ ████ ████ ████   
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐  
│    10   │    30   │    50   │    70   │    90   │  
0         20        40        60        80        101
                                                     
           <-----  TEST1  ----->                     
                                                     
                                                     
Performing a distribution analysis can provide some  
interesting insight to the data that resides in      
numeric, date and character fields.  For example, you
can use the analysis to spot trends, catch data entry
errors, make decisions about modifying the database  
structure, schedule events or isolate poorly         
scheduled events.                                    
                                                     
When analyzing the length of character fields, or the
contents of numeric and date type fields, the number 
of records whose value or date (whatever the case may
be) falls within an associated partition is reported.
Fourteen partitions are displayed in the auto mode   
and up to 10 partitions are available in the manual  
mode.                                                
                                                     
For a date or value to "fall" within a partition, the
date or value under analysis must be greater than or 
equal to the lower limit  of the partition and less  
than the upper limit of the partition.  Take a look  
at the graph displayed at the beginning of the       
section.  For the sake of example let's say the field
under analysis is named TEST1 and the data in TEST1  
is numeric (like test grades).  This graph show that 
20 records where found that contained test grades    
greater than or equal to 40 and less than 50.  If a  
test grade where found to be exactly equal to 50, it 
would have been put in the next partition (50 - 60). 
                                                     
When analyzing character fields using the auto mode, 
you may display the distribution of the trimmed      
length of the field contents or the alphabetic       
distribution of the field.  The "trimmed length" of  
the field is simply the number of characters that    
were typed in the field.  For example, "SMITH"       
is 5 characters long.  Reporting the "trimmed length"
can be used as an alternative to reporting the       
"Optimal Structure" (see section 5).  The alphabetic 
distribution simply displays partitions that are     
separated by letters.  The graph displays the number 
of records that begin with the letter(s) indicated in
each partition.                                      
                                                     
If you need to find the distribution of different    
groups that may exist in a character type field      
(groups like states or zip codes) you must use either
the "manual mode" or the "duplicate record" analysis.
Refer to the respective sections for more informa-   
tion.                                                
                                                     
                                                     
Auto mode features                                   
------------------                                   
Using the auto mode is easy, simply select the field 
for analysis after selecting the auto mode analysis  
selection from the main menu.   In the auto mode all 
the decisions about the partition sizes are made for 
you.  After the graph (histogram) is displayed, you  
may choose to print it or save it in a disk file.    
                                                     
Creating a filter (see FILTER section) allows you to 
zero in on a particular partition or analyze         
selective records.                                   
                                                     
                                                     
Manual mode features                                 
--------------------                                 
The manual mode method requires a little more effort,
but allows more flexibility.  Using the manual mode  
you can select from a field list or enter a numeric  
or date type expression.  The expression entry mode  
provides the means to enter mathematical, date, and  
conditional statements for use in the analysis field.
                                                     
In addition to expression mode entry, in the manual  
mode you enter your own partitions.  In this way you 
can narrow in on a particular partition or ignore    
other partitions without having to create a filter   
first.  However, you may still use a filter (see     
FILTER section) to zero in on a particular partition 
or analyze selective records.                        
                                                     
The manual mode setup can be saved for later use.    
                                                     
                                                     
Statistics                                           
----------                                           
                                                     
Both the auto and manual mode report basic statistics
such as total, average, min, max, variance, and      
standard deviation.                                  
                                                     
In the auto-mode, some non-standard (but interesting)
statistics are also reported.  These statistics      
include the min and max splits observed based upon a 
sorted field.                                        
                                                     
Take a look at the following example, the min split  
occurs between the records that contain 33 and 34,   
and the max split occurs between the records that    
contain 5 and 20.  This analysis is useful for       
analyzing schedules and amounts of dispersion that   
may exist in data.                                   
                                                     
--Example--                                          
                                                     
(unsorted)   (sorted)                                
AMOUNT       AMOUNT                                  
---------    --------                                
  5          0                                       
  10         2                                       
  2          5  ---\ max split                       
  0          20 ---/                                 
  34         30                                      
  30         33 ---\ min split                       
  34         34 ---/                                 
                                                     
                                                     
Generating an Auto Mode Distribution                 
------------------------------------                 
To generate an auto mode distribution:               
                                                     
1.  Select "Distribution analysis (auto)" from the   
    main menu.                                       
2.  Select the desired field.                        
3.  If a character field was selected, selected the  
    "trimmed length" or alphabetic "distribution"    
    option.                                          
4.  After the graph is displayed and statistics are  
    displayed, you may send them to the printer or   
    disk file for a permanent record.  Select the    
    desired option.                                  
                                                     
                                                     
Generating a Manual Mode Distribution                
-------------------------------------                
To generate a manual mode distribution:              
                                                     
1.  Select "Distribution analysis (auto)" from the   
    main menu and then select "Create a distribution 
    table".                                          
2.  Select the desired field or press F10 to switch  
    to the expression entry mode.  If you select the 
    expression mode, the expression must return a    
    date or numeric type.  See APPENDIX A for a list 
    of available commands.                           
3.  Press ENTER to continue to the partitions menu.  
4.  Enter the desired partitions in ascending order  
    and then press F10 to analyze.                   
5.  After the graph is displayed and statistics are  
    displayed, you may send them to the printer or   
    disk file for a permanent record.  In addition,  
    you can select to save the manual setup or edit  
    the expression and partitions.  If you decide to 
    edit the partitions repeat the above steps       
    starting with step 2.  If you decide to save the 
    setup, select that option, enter a description   
    and press ENTER.                                 
                                                     
                                                     
Recalling a stored distribution analysis             
----------------------------------------             
To Recall or Edit a saved distribution analysis:     
                                                     
You can execute, edit or delete a manual distribution
analysis that was saved.  In all cases, the stored   
distribution descriptions must first be displayed by 
selecting "Distribution analysis (manual)" from the  
main menu and then selecting "Recall a stored        
filter".                                             
                                                     
1.  Position the menu bar to the desired selection.  
2.  Execute the selection by pressing ENTER.         
3.  Edit the selecting by pressing F10 and then      
    selecting the appropriate editing selection.     
    Press ESCAPE while editing to abort any changes. 
4.  To delete the filter, position the menu bar to   
    the desired filter and press F8.  Press "Y" or   
    "N" in response to the accidental erasure prompt.
                                                     
                                                     
                                                     
APPENDIX A - dBASE functions                         
                                                     
The following is a list of functions that can be used
when specifying filters, and expressions for         
distribution analysis.  If you're are not familiar   
with the dBASE language or syntax and desire to be,  
many good texts are available at most book stores.   
                                                     
WHAT WORKS                                           
----------                                           
n=ABS(n)                c=ALIAS(n)                   
n=ASC(C)                n=AT(c1,c2)                  
l=BOF()                 c=CDOW(d)                    
c=CHR(n)                c=CMONTH(d)                  
d=CTOD(c)               d=DATE()                     
n=DAY(d)                l=DELETED()                  
c=DOW(d)                c=DTOC(d)                    
c=DTOS(d)               l=EMPTY(exp)                 
l=EOF()                 n=EXP(n)                     
n=FCOUNT()              c=FIELDNAME(n)               
n,c=IIF(expl,exp1,exp2) c=INDEXKEY(n)                
n=INT(n)                n=LASTREC()                  
c=LEFT(c,n)             n=LEN(c)                     
n=LOG(n)                c=LOWER(c)                   
c=LTRIM(c)              n=MAX(n1,n2)                 
n=IN(n1,n2)             n=MONTH(d)                   
n=PCOL()                n=PROW()                     
n=RECNO()               c=REPLICATE(c,n)             
n=ROUND(n1,n2)          n=SECONDS()                  
c=SUBSTR(c,n1,n2)       n=TIME()                     
c=TRANSFORM(exp,c)      c=TRIM(c)                    
c=TYPE("c")             l=UPDATED()                  
c=UPPER(c)              n=VAL(c)                     
n=YEAR(d)                                            
                                                     
WHAT DOESN'T WORK                                    
-----------------                                    
ALLTRIM(c)         DBFILTER()                        
DISKSPACE(n)       DOSERROR()                        
HEADER()           ISALPHA(c)                        
ISUPPER(c)         ISLOWER(c)                        
LEFT(c,n)          LUPDATE()                         
RAT()              RECSIZE()                         
RIGHT(c,n)         SOUNDEX(c)                        
STRTRAN(c1,c2,c3,n1,n2)                              
STUFF(c1,n1,n2,c2)                                   
                                                     
(c) -> character expression     c= returns character 
(n) -> numeric expression       n= returns numeric   
(d) -> date expression          d= returns date      
(l) -> logical expression       l= returns logical   
