home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / search.lbr / SEARCH.DZC / SEARCH.DOC
Encoding:
Text File  |  1993-10-25  |  10.9 KB  |  227 lines

  1.                         Documentatioε Filσ fo≥ SEARCH
  2.                            ┴ε Informatioε Utility
  3.  
  4.  
  5. RAMBLING╙ AN─ RATIONAL:
  6.  
  7. Onσ oµ thσ maiε reason≤ fo≥ owinτ ß compute≥ i≤ t∩ assis⌠ iε organizinτ data«  ì
  8. However¼ mos⌠ oµ thσ "informatioε organizingó program≤ arounΣ toda∙ arσ ì
  9. complicateΣ anΣ cumbersomσ t∩ use«  Thσ tasδ oµ enterinτ anΣ editinτ datß ì
  10. typicall∙ require≤ yo⌡ t∩ movσ bacδ anΣ fortΦ betweeε severa∞ menues«  Wheε ì
  11. yo⌡ wan⌠ t∩ usσ thσ informatioε storeΣ iε thσ "databaseó yo⌡ discove≥ tha⌠ ì
  12. thσ thing≤ yo⌡ wan⌠ t∩ looδ fo≥ arσ no⌠ ke∙ field≤ anΣ therσ i≤ n∩ wa∙ t∩ ì
  13. acces≤ thσ informatioε othe≥ thaε dumpinτ ou⌠ thσ entirσ database«  Iε ì
  14. addition¼ thσ datß i≤ usuall∙ storeΣ a≤ fixeΣ lengtΦ fields«  Much∩ disδ ì
  15. spacσ i≤ wasted«  Afte≥ enterinτ 50░ name≤ int∩ thσ database¼ yo⌡ wil∞ finΣ ì
  16. onσ whicΦ i≤ to∩ lonτ t∩ fi⌠ iε thσ field«  Plus¼ afte≥ enterinτ datß fo≥ ì
  17. severa∞ days¼ yo⌡ wil∞ decidσ tha⌠ i⌠ surσ woulΣ bσ nicσ iµ yo⌡ haΣ aε ì
  18. additiona∞ fielΣ fo≥ onσ morσ item¼ etc.
  19.  
  20. Thσ program¼ SEARCH¼ wa≤ writteε t∩ hel≡ overcomσ somσ oµ thσ difficultie≤ iε ì
  21. managinτ information«  SEARC╚ i≤ usefu∞ fo≥ findinτ informatioε entereΣ iε ì
  22. unstructureΣ databases.
  23.  
  24. Durinτ thσ ninσ year≤ ╔ havσ beeε hackinτ oε m∙ computer¼ ╔ havσ madσ ì
  25. countles≤ abortivσ attempt≤ t∩ creatσ genera∞ purposσ informatioε retreiva∞ ì
  26. programs«  Thσ firs⌠ attemp⌠ useΣ BASIC¼ m∙ latte≥ attempt≤ useΣ somσ oµ thσ ì
  27. "higΦ techó databasσ managers«  Nonσ werσ eve≥ completed« Thσ program≤ ì
  28. usuall∙ suffocateΣ froφ thσ weigh⌠ oµ thσ code«  To∩ #"$Ñ man∙ menues«  To∩ ì
  29. mucΦ use≥ friendly¼ programme≥ hostilσ code« To∩ man∙ bug≤ iε thσ databasσ ì
  30. software«  To∩ mucΦ mone∙ fo≥ revision≤ oµ thσ softwarσ whicΦ introduceΣ ne≈ ì
  31. bugs« aΣ nauseaum...
  32.  
  33. Conside≥ thσ casσ oµ ß constructinτ ß simplσ combinatioε Mem∩ ¡ Phonσ ì
  34. Directory«  Thσ typσ oµ informatioε ╔ woulΣ wan⌠ t∩ storσ i≤ thσ person'≤ ì
  35. name¼ address¼ phonσ numbe≥ anΣ perhap≤ somσ extrß detai∞ (comments)«  Wheε ╔ ì
  36. actuall∙ ge⌠ int∩ designinτ thσ databasσ ╔ neeΣ t∩ worr∙ abou⌠ ho≈ lonτ eacΦ ì
  37. oµ thσ field≤ mus⌠ be¼ ho≈ mucΦ detai∞ ╔ wan⌠ t∩ kee≡ oε thσ address«  D∩ ╔ ì
  38. wan⌠ t∩ havσ aε alternatσ addres≤ field┐  ShoulΣ ╔ als∩ includσ ß fielΣ fo≥ ß ì
  39. busines≤ phonσ a≤ wel∞ a≤ persona∞ phone(s)┐  Wha⌠ abou⌠ HarolΣ Jones┐  Hσ ì
  40. ha≤ tw∩ phones.
  41.  
  42. Assuminτ tha⌠ ╔ managσ t∩ ge⌠ thσ databasσ designed¼ theε ╔ neeΣ t∩ worr∙ ì
  43. abou⌠ enterinτ anΣ changinτ informatioε anΣ searchinτ fo≥ information«  Wha⌠ ì
  44. wil∞ ╔ usσ fo≥ searcΦ fields┐  ShoulΣ ╔ inde° b∙ name┐  Wha⌠ iµ ╔ wan⌠ t∩ ì
  45. searcΦ thσ phonσ lis⌠ fo≥ ß worΣ o≥ identifie≥ iε thσ commen⌠ field┐  Wha⌠ i≤ ì
  46. thσ phonσ numbe≥ oµ thσ persoε wh∩ saiΣ hσ haΣ thσ schematic≤ oε thσ Motorolß ì
  47. 300│ monitor┐  ShoulΣ ╔ havσ ß separatσ databasσ fo≥ comments«  ShoulΣ thi≤ ì
  48. databasσ havσ linkagσ witΦ thσ othe≥ database┐  
  49.  
  50. ╔ thinδ yo⌡ begiε t∩ seσ m∙ problem«  ╔ wan⌠ t∩ kee≡ al∞ sort≤ oµ unrelateΣ ì
  51. bu⌠ interestinτ informatioε iε thσ samσ databasσ anΣ bσ ablσ t∩ ge⌠ a⌠ i⌠ ì
  52. witΦ ease.
  53.  
  54. Thσ probleφ whicΦ reall∙ stimulateΣ m∙ thinkinτ wa≤ ho≈ t∩ maintaiε ß ì
  55. "databasσ" oε thσ article≤ anΣ letter≤ founΣ iε thσ variou≤ issue≤ oµ thσ ìèexcellen⌠ publication¼ "Micr∩ Cornucopia"«  Thosσ oµ u≤ wh∩ havσ singlσ boarΣ ì
  56. compute≥ system≤ likσ thσ Fergusoε Biτ Board¼ conside≥ "Micr∩ Có t∩ bσ ß ì
  57. nationa∞ treasure«  Thσ trouble¼ a≤ witΦ al∞ publications¼ i≤ ho≈ t∩ locatσ ì
  58. informatioε burieΣ iε pas⌠ issue≤ withou⌠ spendinτ al∞ nigh⌠ lookinτ througΦ ì
  59. them«  Actually¼ al∞ nigh⌠ i≤ no⌠ nea≥ lonτ enough«  Oncσ ╔ ge⌠ starteΣ ì
  60. lookinτ througΦ olΣ issues¼ ╔ finΣ interestinτ article≤ tha⌠ ╔ haΣ forgotteε ì
  61. abou⌠ o≥ overlooked«  Thσ enΣ resul⌠ i≤ tha⌠ ╔ usuall∙ ge⌠ s∩ absorbeΣ iε ì
  62. readinτ thσ olΣ article≤ tha⌠ ╔ forge⌠ wha⌠ ╔ wa≤ lookinτ for«  Alas!
  63.  
  64.  
  65.                                 Usinτ SEARCH
  66.  
  67.  
  68. SEARC╚ i≤ ß ver∙ eas∙ prograφ t∩ use«  Thσ program'≤ namσ describe≤ it≤ ì
  69. function╗ i⌠ wa≤ designeΣ t∩ searcΦ ß filσ fo≥ ß patterε match«  Iµ thσ matcΦ ì
  70. i≤ made¼ thσ recorΣ (o≥ lump⌐ oµ informatioε i≤ displayeΣ whicΦ contain≤ thσ ì
  71. match«  I⌠ doe≤ no⌠ suffe≥ froφ "rampan⌠ featuritisó (a⌠ leas⌠ no⌠ yet).
  72.  
  73. SEARC╚ wa≤ designeΣ t∩ searcΦ fo≥ matche≤ oε simplσ ASCI╔ tex⌠ files«  Thσ ì
  74. datß (text⌐ file≤ caε bσ generateΣ usinτ virtuall∙ an∙ halfwa∙ decen⌠ editor«  ì
  75. Editor≤ oµ thσ MultiMatσ ilδ arσ excluded«  Thesσ ilδ editors¼ anΣ ╔ usσ thσ ì
  76. terφ editor≤ loosely¼ prefe≥ t∩ kee≡ thσ fruit≤ oµ you≥ labo≥ lockeΣ awa∙ iε ì
  77. incomprehensiblσ binar∙ jibberish.
  78.  
  79. Records:
  80.  
  81. SEARC╚ allow≤ thσ databasσ t∩ bσ "organizedó a≤ ß serie≤ oµ "disorganizedó ì
  82. records«  A≤ fa≥ a≤ SEARC╚ i≤ concerned¼ ß recorΣ i≤ simpl∙ ß collectioε ì
  83. (clump⌐ oµ informatioε (ASCI╔ tex⌠ lines⌐ separateΣ froφ othe≥ clump≤ oµ datß ì
  84. (text⌐ b∙ somσ sor⌠ oµ specia∞ characte≥ sequence« 
  85.  
  86. B∙ defaul⌠ thσ specia∞ characte≥ sequencσ whicΦ delimit≤ SEARC╚ record≤ i≤ ì
  87. an∙ blank linσ or any line whicΦ begin≤ witΦ tw∩ minu≤ signs«  Fo≥ example:
  88.  
  89. --
  90. Thi≤ i≤ ß recorΣ containinτ some
  91. informatioε abou⌠ thing≤ iε general«  Iε particular,
  92. i⌠ i≤ thσ firs⌠ recorΣ iε thσ file«  M∙ phonσ numbe≥ is
  93. 555-1234« (no⌠ really)
  94.  
  95. Thi≤ i≤ thσ seconΣ recorΣ iε thσ file« Notσ tha⌠ this record is separated
  96. from the previous record by a blank line. This
  97. recorΣ doe≤ no⌠ contaiε an∙ more usefu∞ information.
  98. -¡  comment≤ caε g∩ he≥σ also
  99. Thi≤ i≤ thσ thirΣ recorΣ iε thσ file« Notσ tha⌠ thσ tw∩ minus
  100. sign≤ a⌠ thσ beginninτ oµ thσ linσ arσ al∞ tha⌠ i≤ requireΣ t∩ separate
  101. records«  Comment≤ caε follo≈ thσ tw∩ minu≤ sign≤.
  102. ------------
  103. Thi≤ i≤ thσ fourtΦ record«  Thσ recorΣ delimite≥ caε als∩ contaiε more
  104. thaε tw∩ minu≤ signs«  I⌠ mus⌠ havσ a⌠ leas⌠ two
  105. -
  106. Thi≤ i≤ stil∞ thσ fourtΦ record« Thσ linσ abovσ start≤ witΦ les≤ thaε
  107. tw∩ minu≤ signs.
  108. etc...
  109. è
  110. Datß Fields:
  111.  
  112. Wha⌠ caε ╔ sa∙ abou⌠ datß fields┐  A≤ fa≥ a≤ SEARC╚ i≤ concerned¼ datß i≤ ì
  113. anythinτ betweeε thσ recorΣ delimiters«  Strinτ o≥ patterε matche≤ caε bσ ì
  114. madσ oε an∙ o≥ al∞ oµ thσ data«  SEARC╚ doe≤ no⌠ requirσ predefineΣ o≥ fixeΣ ì
  115. lengtΦ records« 
  116.  
  117.  
  118.                                 USAG┼ SYNTAX
  119.  
  120.  
  121. Thσ correc⌠ synta° fo≥ usinτ SEARC╚ is:
  122.  
  123. SEARC╚ file1.ex⌠ file2.ex⌠ FO╥ word▒ word_worΣ2 word│ etπ -N
  124.  
  125. SEARC╚ use≤ thσ keyworΣ FO╥ t∩ separatσ thσ filσ name≤ froφ thσ pattern≤ ì
  126. (words⌐ t∩ match«  Iµ FO╥ i≤ no⌠ entered¼ SEARC╚ wil∞ generatσ aε erro≥ ì
  127. messagσ.
  128.  
  129. Severa∞ filσ name≤ caε bσ giveε beforσ thσ FOR«  Unfortunately¼ filσ name≤ ì
  130. canno⌠ bσ entereΣ a≤ wildcards«  T∩ kee≡ thσ prograφ a≤ portablσ a≤ possible¼ ì
  131. ╔ haΣ t∩ leavσ ou⌠ wildcarΣ filσ namσ expansion«  AlthougΦ thσ UNI╪ shel∞ ì
  132. automaticall∙ handle≤ thσ expansion¼ mos⌠ othe≥ operatinτ systeφ shell≤ d∩ ì
  133. no⌠ (to∩ bad)«  ╔ ma∙ relen⌠ late≥ anΣ adΣ wildcarΣ expansioε a⌠ thσ expensσ ì
  134. oµ portability« Maybe.
  135.  
  136. Strinτ o≥ patterε matche≤ arσ casσ insensitive« Also¼ matche≤ arσ handleΣ a≤ ì
  137. aε O╥ function«  Fo≥ example¼ iµ thσ word≤ "diskó anΣ "driveó arσ used¼ ì
  138. SEARC╚ wil∞ looδ fo≥ ß matcΦ witΦ eithe≥ disδ o≥ drive«  Iµ eithe≥ i≤ found¼ ì
  139. thσ entirσ recorΣ wil∞ bσ displayed«  Quote≤ arσ useΣ herσ fo≥ clarit∙ only¼ ì
  140. the∙ arσ no⌠ requireΣ o≥ recommendeΣ oε thσ commanΣ line.
  141.  
  142. -╬ (filσ name⌐ option:
  143.  
  144. Wheε SEARC╚ find≤ ß patterε match¼ i⌠ wil∞ displa∙ thσ entirσ recorΣ anΣ theε ì
  145. ß recorΣ delimite≥ (tw∩ minu≤ signs)«  Iµ thσ -╬ optioε i≤ specified¼ SEARC╚ ì
  146. wil∞ givσ thσ recorΣ delimite≥ iε thσ form:
  147.  
  148. ------¡ Filσ --╛ squat.tx⌠ -------
  149.  
  150. wherσ squat.tx⌠ i≤ thσ namσ oµ thσ filσ iε whicΦ thσ patterε matcΦ i≤ made« ì
  151. Aε examplσ oµ thσ -╬ optioε i≤ a≤ follows:
  152.  
  153. SEARC╚ squat.tx⌠ FO╥ disδ drivσ -N
  154.  
  155. Phantoφ Spaces:
  156.  
  157. Thσ specia∞ character¼ ASCI╔ underlinσ '_'¼ ma∙ bσ useΣ t∩ designatσ ß ì
  158. "phantomó space«  Fo≥ example¼ iµ yo⌡ arσ interesteΣ onl∙ iε thσ patterε ì
  159. "disδ driveó yo⌡ woulΣ ente≥ i⌠ a≤ disk_drive«  Iε thi≤ casσ SEARC╚ wil∞ ì
  160. displa∙ thσ recorΣ onl∙ iµ i⌠ find≤ thσ tex⌠ sequencσ "disδ drive"«  
  161.  
  162. Conside≥ thσ probleφ oµ lookinτ fo≥ reference≤ t∩ ╡ 1/┤ incΦ disδ drives«  ì
  163. Onσ wa∙ woulΣ bσ t∩ specif∙ thσ patterε matcΦ a≤ "╡ 1/4"«  Iε thi≤ casσ ì
  164. SEARC╚ wil∞ makσ matche≤ oε al∞ occurance≤ oµ thσ digi⌠ ╡ anΣ als∩ oε thσ ìèfractioε 1/4«  Yo⌡ wil∞ surel∙ finΣ al∞ reference≤ t∩ ╡ 1/┤ incΦ disδ drive≤ ì
  165. a≤ wel∞ a≤ al∞ phonσ number≤ containinτ thσ numbe≥ 5«  Informatioε explosioní  ì
  166. Thσ wa∙ t∩ ge⌠ arounΣ thi≤ probleφ i≤ t∩ ente≥ thσ searcΦ patterε a≤ "5_1/4".
  167.  
  168. RedirecteΣ Output:
  169.  
  170. Normally¼ SEARC╚ display≤ it'≤ informatioε oε thσ console«  Becausσ oµ ß ì
  171. buil⌠ iε featurσ oµ AZTE├-C¼ thσ outpu⌠ caε bσ sen⌠ t∩ ß file«  Followinτ thσ ì
  172. UNI╪ convention¼ thσ specia∞ characte≥ ">ó followeΣ b∙ ß filσ name¼ wil∞ ì
  173. causσ thσ outpu⌠ t∩ bσ redirecteΣ t∩ thσ file«  Fo≥ example¼
  174.  
  175. SEARC╚ squat.tx⌠ fo≥ disk_drivσ >foo.bar
  176.  
  177. wil∞ senΣ thσ result≤ oµ thσ patterε search¼ iµ any¼ t∩ thσ filσ foo.ba≥ ì
  178. rathσ≥ thaε displayinτ i⌠ oε thσ console« 
  179.  
  180. Usσ oµ filσ directeΣ outpu⌠ wil∞ enablσ yo⌡ t∩ perforφ AN─ typσ patterε ì
  181. matches«  Fo≥ example¼ conside≥ tha⌠ yo⌡ arσ lookinτ fo≥ al∞ article≤ tha⌠ ì
  182. dea∞ witΦ ╡ 1/┤ disδ drivσ maintenence«  Becausσ yo⌡ canno⌠ bσ certaiε tha⌠ ì
  183. al∞ appropriatσ entrie≤ iε thσ filσ contaiε thσ sequencσ "╡ 1/┤ disδ drivσ ì
  184. maintenence"¼ yo⌡ wil∞ havσ t∩ bσ ß morσ general«   Yo⌡ migh⌠ tr∙ thσ ì
  185. following:
  186.  
  187. SEARC╚ squat.tx⌠ FO╥ 5_1/┤ disδ drivσ >foo.bar
  188. SEARC╚ foo.ba≥ FO╥ main⌠ diaτ troub
  189.  
  190. Thσ firs⌠ commanΣ linσ wil∞ extrac⌠ al∞ record≤ whicΦ mentioε ╡ 1/┤ o≥ disδ ì
  191. o≥ drive«  Thσ outpu⌠ wil∞ theε bσ writteε t∩ thσ filσ foo.bar«  Thσ seconΣ ì
  192. commanΣ linσ wil∞ theε examinσ thσ filσ foo.ba≥ fo≥ al∞ record≤ whicΦ contaiε ì
  193. thσ worΣ fragment≤ maint¼ diag¼ o≥ troub«  Thσ result≤ oµ thσ fina∞ searcΦ ì
  194. wil∞ bσ displayeΣ oε thσ screen«  Thσ sequencσ caε bσ extendeΣ forever¼ o≥ ì
  195. unti∞ yo⌡ ruε ou⌠ oµ disδ spacσ o≥ thing≤ t∩ looδ for.
  196.  
  197. Tes⌠ File:
  198.  
  199. Aε examplσ tes⌠ filσ i≤ supplieΣ iε thσ library«  Thσ datß containeΣ iε thσ ì
  200. filσ i≤ thσ resul⌠ oµ scanninτ Volume≤ │ anΣ 2│ oµ "Micr∩ Cornucopia"«  ì
  201. AlthougΦ thσ datß ma∙ appea≥ cryptiπ t∩ you¼ yo⌡ caε adΣ additiona∞ ì
  202. informatioε a≤ required« Fee∞ freσ t∩ pla∙ witΦ it« 
  203.  
  204. Enjoy!
  205.  
  206.  
  207.                         Warrant∙ anΣ Copyrigh⌠ Notice
  208.  
  209. Thσ program¼ SEARCH¼ i≤ guaranteeΣ t∩ worδ fo≥ ß perioΣ no⌠ exceedinτ thirt∙ ì
  210. day≤ o≥ thirt∙ seconds¼ whicheve≥ come≤ first«  ShoulΣ yo⌡ encounte≥ problem≤ ì
  211. o≥ bug≤ iε thσ program¼ bea≥ iε minΣ ho≈ mucΦ yo⌡ paiΣ fo≥ it«  Buτ fixe≤ anΣ ì
  212. enhancement≤ ma∙ o≥ ma∙ no⌠ bσ madσ available¼ dependinτ oε ho≈ thσ autho≥ ì
  213. feel≤ anΣ thσ phasσ oµ thσ moon«  Iµ yo⌡ havσ question≤ abou⌠ thσ program¼ ì
  214. pleasσ hesitatσ t∩ call.
  215.  
  216. Thσ program¼ SEARCH¼ i≤ CopyrighteΣ b∙ Doε L« Finley«  Thσ author¼ Doε L« ì
  217. Finley¼ ha≤ releaseΣ thσ prograφ int∩ thσ publiπ domaiε fo≥ al∞ t∩ usσ anΣ ì
  218. enjoy«  Thσ prograφ mus⌠ no⌠ bσ solΣ fo≥ commercia∞ gaiε althougΦ distrbutioε ìèb∙ publiπ domaiε softwarσ organization≤ i≤ permitteΣ anΣ encouraged«  
  219.  
  220. ╔ woulΣ appreciatσ receivinτ an∙ enhancement≤ o≥ buτ fixe≤ madσ t∩ thσ ì
  221. program«  SenΣ al∞ sucΦ stufµ througΦ ou≥ RBB╙ a⌠ (615⌐ 22╣-448╕   300/120░ ì
  222. bp≤  2┤ h≥ (xmodeφ support).
  223.  
  224.  
  225. Doε L« Finley
  226. 31░ Willo≈ St.
  227. Mt« Carmel¼ T╬ 37642
  228. (615⌐ 357-335╡  (afte≥ 6pm)