home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / dbaseii / unique24.ark / UNIQUE24.DOC < prev   
Text File  |  1987-12-16  |  11KB  |  234 lines

  1.            ==== DOCUMENTATION FOR UNIQUE.CMD (C) ====
  2.  
  3.                            Version 2.4
  4.                        Released 12/16/1987
  5.  
  6.         A dBASEII(tm) Utility To Purge Duplicate Records
  7.                   From a dBASEII(tm) .DBF file
  8.  
  9.                                by
  10.                          James A. Gronek
  11.                         Phoenix, Arizona
  12.                                 &
  13.                         Stephen Aidikonis
  14.                       Streamwood, Illinois
  15.  
  16.                      COPYRIGHT (C) UCS, inc.
  17.                         1984, 1985, 1987
  18.                        ALL RIGHTS RESERVED
  19.  
  20.               dBASEII is a trademark of Ashton-Tate
  21.  
  22.                    Incorporates routines from:
  23.  
  24.             DATEIN.CMD (c) 1983 by Bernard L. Lambert
  25.                SHRINK.CMD (c) 1984 by Les Shockley
  26.  
  27.                     ====  WHAT IS IT??  ====
  28.  
  29.      UNIQUE.CMD  is  a utility program that is designed to  allow
  30. you  to purge almost ANY dBASEII .DBF file of duplicate  records.
  31. It  is written in the dBASEII applications language and  requires
  32. dBASEII version 2.4 or later to run on any  computer.  UNIQUE.CMD
  33. may be used with any database that has character fields to use as
  34. keys.   It  creates  a  file,   UNIQUE.DBF,   that  contains  the
  35. unduplicated  records of your original source database.  Once you
  36. have verified the validity of UNIQUE.DBF,  you may rename it  for
  37. use  in  place of your source database.  It will not  alter  your
  38. source database in any ANY WAY!!
  39.  
  40.                   ==== HOW DO I USE IT?? ====
  41.  
  42.      Place DBASE.COM,  DBASEOVR.COM, and UNIQUE.CMD together with
  43. the database you wish to purge. Ensure that you have a blank disk
  44. in  the default drive,  or sufficient space on the disk with your
  45. database  to allow for working room.  See the discussion on  free
  46. space requirements later under TRADEOFFS.
  47.  
  48.      When  you execute the program ( A>DBASE  UNIQUE<CR>  ),  you
  49. will be prompted for a system date,  and a default drive.  If you
  50. do  not have sufficient space on the same disk with your original
  51. database,  select a disk with sufficient space for working  files
  52. and the database of unique records, UNIQUE.DBF.
  53.  
  54.      Next, you will be presented with a list of the .DBF files on
  55. your default disk, and asked to select the database to be purged.
  56. If you selected a blank disk as your default drive, no files will
  57. be  listed.  Enter the PRIMARY FILENAME of the .DBF to be  purged
  58. (including the drive, if not on the default disk).
  59.  
  60.      After some status messages, you will be shown a selection of
  61. character fields in your .DBF and asked for an index key.  Select
  62. the field names to be used for comparison,  one at a time. Ensure
  63. that  you  select a sufficient number of fields to compare on  to
  64. guarantee  record  uniqueness.  Watch out that you  don't  exceed
  65. dBASE's  internal limits of 99 characters in your index  key!  If
  66. you do, you will be unceremoniously dumped to a dot prompt.
  67.  
  68.      As  you  enter the field names to be used,  you will  see  a
  69. status line appear on the bottom line of the screen,  showing the
  70. syntax  of  the  index key you are  constructing.  It  will  look
  71. something like this:
  72.  
  73.           FIELDNAME1+FIELDNAME2+FIELDNAME3+FIELDNAME4 ...
  74.  
  75.      You may select on up to FIVE separate fields so long as  the
  76. combined  length  of the fields does not exceed the 99  character
  77. limit.  When  you  have entered the last field name to  be  used,
  78. enter a <RETURN> to continue.
  79.  
  80.      You  will be presented with a choice of two ways  to  attack
  81. the problem.  You may select either "A" or "B" from the menu. See
  82. the section following:
  83.  
  84.                       ==== TRADEOFFS ====
  85.  
  86.      The   two   methods  used  to  purge  the  database   differ
  87. dramatically.  Selection "A" uses a technique that is very MEMORY
  88. VARIABLE  DEPENDANT and can only be used on databases with 22  or
  89. fewer  total  fields.   The  purge  function  will  begin  almost
  90. immediately,  but  proceeds  SLOWLY from there,  on through  your
  91. database.  This method requires less free disk space to use  than
  92. method "B", described next, but can take as much as TWICE as long
  93. to run as method "B".
  94.  
  95.      Selection "B" uses a technique that requires the indexing of
  96. the  source database on the index key before starting the  actual
  97. purge  function.  This  can  take  varying  amounts  of  time  to
  98. accomplish,  depending  on  the number of records in  the  source
  99. database,  and  the complexity of the index key.  About the  only
  100. thing  I can tell you is that it will ALWAYS seem to take  longer
  101. than  it should.  Once the Purge has started,  the program fairly
  102. RIPS through the database, about as fast as a terminal can update
  103. the  count on the screen,  faster in some cases.  This method  is
  104. extremely DISK SPACE DEPENDANT.  IN ORDER TO ENSURE A  SUCCESSFUL
  105. RUN YOU SHOULD HAVE,  AT LEAST, FOUR (4) TIMES AS MUCH FREE SPACE
  106. AS  THE  SIZE OF THE SOURCE DATABASE!!!  If you are running on  a
  107. hard disk, you have no problems. Those on floppies may run out of
  108. room with larger databases.  This method can be (by my  benchmark
  109. tests, anyway) up to 2.5 times as fast as method "A".
  110.  
  111.      So,  which one should you use?  It depends on your database.
  112. If  you  have a small database (few records) then  selection  'A'
  113. will  probably  be faster,  overall.   You will not have to  wait
  114. while UNIQUE constructs an index file on your database.
  115.  
  116.      If,  on the other hand,  you have a database of 300 or  more
  117. records,  'B' is your best bet.   It starts slower, but runs MUCH
  118. faster through longer databases, than the 'A' routine.
  119.  
  120.      During  the time the program is processing your source .DBF,
  121. status messages will be sent to the console advising you of  what
  122. record numbers are under study at any given time.
  123.  
  124.                ====  KNOWN BUGS AND CAUTIONS ====
  125.  
  126.      UNIQUE.CMD  is  NOT fast.   It is written  entirely  in  the
  127. dBASEII applications language and is intensely disk-bound, hence,
  128. very slow.   Despite its 'underwhelming' speed of execution,  its
  129. flexibity  may  make it a valuable addition to the dBASEII  users
  130. 'Toolkit'.
  131.  
  132.            ====  VERSION 2.0 UPDATE INFORMATION  ====
  133.  
  134.      This  release of UNIQUE.CMD incorporates  many  improvements
  135. over  the  original  version,  primarily due to  the  efforts  of
  136. STEPHEN  AIDIKONIS of Streamwood,  Illinois.  Steve came up  with
  137. error  checking routines that greatly improved the key  selection
  138. routine.  He  also  came  up with TWO  different  (and  superior)
  139. methods  to  do  the purge function.  I studied and  tested  both
  140. before  deciding  that each had its' own  merits,  and  potential
  141. applications.    Well,  they  are  both  incorporated  into  this
  142. version,  you may select from them as appropriate.  Thanks Steve,
  143. your efforts made a useful tool into an indispensible one.
  144.  
  145.            ==== VERSION 2.1 UPDATE INFORMATION ====
  146.  
  147.      This release repairs a 'bug' found in the (A) search routine
  148. and  incorporates some additional changes to reduce the  size  of
  149. the .CMD file.
  150.  
  151.            ==== VERSION 2.2 UPDATE INFORMATION ====
  152.  
  153.      This release is functionally identical to version 2.1,  with
  154. the exception that default drives may be in the range "A" through
  155. "P".  This  modification  was made at the request of  some  users
  156. without  contiguous  disk drives.  Version 2.2 also  incorporates
  157. some  additional changes to reduce the size of the command  file,
  158. and speed execution.
  159.  
  160.            ==== VERSION 2.3 UPDATE INFORMATION ====
  161.  
  162.      This release incorporates NUMEROUS coding changes, mostly to
  163. eliminate unnecessary or redundant commands, and correct a couple
  164. of  minor display bugs.   Version 2.3 is,  again,  released as an
  165. encoded  file.   With the plethora of Public  Domain  Uncrunchers
  166. available,  I  hold  no illusions concerning the security of  the
  167. file.   The 'uncrunched' file will indeed demonstrate the  coding
  168. techniques used,  but, they will be unintelligable to all but the
  169. most  sophisticated  of  dBASE  programmers  without  the  source
  170. comments.
  171.  
  172.  
  173.             ==== VERSION 2.4 UPDATE INFORMATION ====
  174.  
  175.      This   release  of  UNIQUE  adds  a  routine  to  check  for
  176. apostrophes or double quote marks in the index key string.  Early
  177. versions  would crash if a double quote mark (") was imbedded  in
  178. the index key string.   Also,  early versions would not accept  a
  179. date  later  than  1985.   This release will not  accept  a  date
  180. earlier  than  1987.   There  have  been changes  made  to  speed
  181. execution and shrink the size of the code.
  182.  
  183.  
  184.                     ====>>>> WARNING <<<<====
  185.  
  186.      Finally,  this  program is COPYRIGHTED.  I wrote it.*  I  am
  187. releasing it to the Public Domain for non-commercial use by other
  188. people  who  may  find  it of use.  This program  may  be  freely
  189. reproduced  and  distributed,  as  long  as  this  file  and  all
  190. copyright notices remain intact and no monetary consideration  is
  191. involved.
  192.  
  193. (*  versions  2.0  &  2.1  co-authored  with  Stephen  Aidikonis,
  194. Streamwood, Ill.)
  195.  
  196.      UNIQUE.CMD  is being distributed as an encrypted  file.  The
  197. file occupies less  space on  the disk,  and executes faster,  in
  198. this  form.   The  .CMD file cannot  be  listed,   or  externally
  199. altered.  I  have attempted to compile UNIQUE,  using  WordTech's
  200. dBASEII Compiler, but the compiler is not sophisticated enough to
  201. allow  the  use  of macros such as those used  in  UNIQUE.  Fully
  202. commented Source  code  is available from the author.
  203.  
  204.      If  you modify the program,  I forgive you.  Please upload a
  205. copy  of  the modified code to me at my RCP/M (see  below)  as  a
  206. 'PRIVATE' file, and PLEASE keep the source code to yourself. If I
  207. decide to incorporate your modification in a future revision, you
  208. will receive appropriate credit in the documentation.
  209.  
  210.      If  you  desire an 'Official' copy of the  commented  source
  211. code,  you may purchase it for $15.00,  if you pick it up from my
  212. RCP/M, or for $25.00 on 5 1/4" disk by return mail. I can support
  213. about  50  different  formats,  leave a message on my  RCP/M  for
  214. information of disk formats.  Money Order or Cash orders will  be
  215. shipped  within  48 hours.  Allow 2 weeks for personal checks  to
  216. clear.
  217.  
  218. JAMES A. GRONEK
  219. President UCS, inc.
  220.  
  221. Telephone:
  222.  
  223. The  Lost Dutchman's Gold Mine PICS
  224. (602)247-2880 300-1200-2400 Baud
  225. 24 Hours 7 Days a week
  226.  
  227. Address:
  228.  
  229. The Lost Dutchman's Gold Mine PICS
  230. Post Office Box 23937
  231. Phoenix, Arizona 85063
  232.  
  233. Attn: Unique
  234.