home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG025.ARK / CATALOG.DOC < prev    next >
Text File  |  1984-04-29  |  8KB  |  222 lines

  1. (THIS IS FILE CATALOG.DOC AS OF 3/13/78)
  2.  
  3. CP/M DISK CATALOGING SYSTEM FOR COMPUTER HOBBYISTS
  4.                 BY WARD CHRISTENSEN
  5.  
  6.                 -----OVERVIEW-----
  7.  
  8. I have always wanted to be able to keep track of
  9. where files are on my CP/M diskettes.  The first
  10. step was to make a 'DIR' listings with the printer on.
  11.  
  12. Next I wrote a command called 'MAP' which printed the
  13. disk extent information also (but not any extent past
  14. the first).  Then I wrote 'SMAP' which produces a sorted
  15. directory listing.  This made finding files in the listings
  16. easier.  At this time I also adopted the convention of
  17. editing a 'dummy' file on each disk, called '-DISK.nnn'
  18. where nnn is the disk's serial number.  Later I changed
  19. the word 'DISK' to any more meaningful name, such as
  20. '-WORK.023' or '-CBIOS.019', etc.  The important
  21. thing was that each started with a '-' which meant it
  22. would sort to the top of the sorted listing.
  23.  
  24. Eventually, I wrote 'FMAP' which creates a sorted
  25. directory listing, but also, if 'FMAP *.* F' is typed,
  26. writes 'NAMES.SUB' to disk with the names of all the
  27. files on the disk.
  28.  
  29. This file of names then got me thinking about having
  30. a master file of names, or a 'master catalog'.
  31.  
  32. That is what I did.  I now have 1 disk file which
  33. contains the file names and disk names for every
  34. pertinent file I have.  I also wrote a command
  35. which behaves like 'DIR' but scans the master catalog.
  36.  
  37.                 -----PROGRAMS-----
  38.  
  39. UCAT.ASM/COM  Maintains 'MAST.CAT'
  40.  
  41. CAT.ASM/COM   Allows 'DIR' search of 'MAST.CAT'
  42.  
  43. FMAP.ASM      Creates a file of the names on a diskette
  44.               as input to 'UCAT.COM' along with 'MAST.CAT'
  45.               FMAP is on CP/M library volume 8 as program
  46.               number 8.14
  47.  
  48.  
  49.         -----INSTALLING THE CATALOGING SYSTEM-----
  50.  
  51. 1)      Edit 'MAST.CAT' in order to place entries
  52. in it for the file names you don't want to be placed in
  53. the catalog.  I already have ASM.COM, STAT.COM, PIP.COM,
  54. and others in the sample MAST.CAT.  Since these are on nearly
  55. every disk, I therefore don't want them to take room in the
  56. catalog.  N-O-T-E you don't have to edit the file -
  57. you may type it and decide to take my defaults.
  58. NOTE The format of the 'empty' MAST.CAT is simply
  59. a list of names which you don't want put in the catalog.
  60. This may be 1 or more file names.  It cannot be zero names.
  61. If you want everything cataloged, put a name such as
  62. 'DUMMY.FIL' in the catalog.  The format is as follows:
  63. Each name is on a separate line.  The first name is pre-
  64. ceeded by a '('.  The last is followed by ')'. thus:
  65. (ASM.COM
  66. PIP.COM
  67. STAT.COM)
  68.  
  69. 2)      Pick a disk which will contain the master
  70. catalog 'MAST.CAT'.  You m-u-s-t serial number (3 digits)
  71. all your diskettes, placing a file '-anyname.nnn' on
  72. each disk.  The UCAT routine then takes this as the name
  73. of the disk.
  74.  
  75. 3)      Put the following files on this master disk:
  76.         MAST.CAT
  77.         FMAP.COM
  78.         UCAT.COM
  79.         CAT.COM
  80.         -anyname.nnn
  81.  
  82. 4)      Type: FMAP A: Q
  83. This will creates NAMES.SUB, which has the names of
  84. the files on this disk.  The 'q' means to write the file
  85. to disk 'quietly'.  If you want to see the listing, type:
  86.         FMAP A: F
  87. Which will write the file, but also print the sorted
  88. directory listing.
  89.  
  90. 5)      Type: UCAT
  91. This will merge the file names in 'NAMES.SUB' (created by
  92. FMAP) with the names in MAST.CAT.  It will report the names
  93. of any files which are added to, or deleted from, the
  94. catalog.
  95.  
  96.         -----USING THE CATALOGING SYSTEM-----
  97.  
  98. 1)      Whenever you put a new diskette into service
  99. you must place a '-anyname.nnn' entry in the directory.
  100. nnn should be the disk's unique serial number.  The easiest
  101. way to place an entry in the directory, with 0 data as-
  102. sociated with it is to 'ED -anyname.nnn' then when
  103. 'NEW FILE' types, type control-c.  This will leave the
  104. entry in the catalog, but will not take any data space.
  105. Then type:ERA *.$$$ (or ERA B:*.$$$) to erase the temporary
  106. file which was created by the editor.
  107.  
  108. 2)      Assuming the disk with the catalog programs is
  109. on drive a, whenever you want to catalog the disk on
  110. drive b, type:
  111.         FMAP B: Q
  112.  then type:
  113.         UCAT
  114. This results in the disk being added to the catalog. 
  115. This can be done whenever you want, as the entries for the
  116. disk are deleted from MAST.CAT and the new ones added. 
  117. This means the cataloging system properly keeps track of
  118. erased files also (i.e. erases them from the catalog when
  119. it no longer finds them on the disk being cataloged). If
  120. you want to re-catalog the 'A' disk, type:
  121.         FMAP A: Q
  122. then type:
  123.         UCAT
  124.  
  125. 3)      Use the 'CAT' command to scan the catalog
  126. as you use 'DIR' to scan the directory of the current
  127. disk.  The operands of 'CAT' are just like 'DIR' except
  128. that there is a second filename.type - namely the disk's name
  129. and serial.  N-O-T-E that UCAT deletes the leading '-'
  130. when it places a disk name in the directory.  Therefore
  131. you don't use the '-' when asking for a particular disk.
  132.  
  133.  
  134. Examples of 'CAT' command requests:
  135.  
  136. CAT                     lists entire catalog
  137. CAT *.* *.002           lists entries for disk 002
  138. CAT *.asm               lists all asm files
  139. CAT A*.*                lists all files starting with 'A'
  140. CAT *.BAS WORK.*        lists all 'BAS' files on any
  141.                         disk with name 'WORK' (any serial)
  142.  
  143. Note that what you type following the CAT command appears
  144. as the title of the resultant listing.  This is particularly
  145. useful for keeping hard copy listings of your catalog, such
  146. as by typing:
  147.  
  148.         CAT *.* *.* AS OF 02/17/78
  149.  
  150. this will result in the title:
  151.  
  152.         FILES: *.* *.* AS OF 12/17/77
  153.  
  154. appearing on each page of the catalog listing.
  155.  
  156. 4)      If you want to erase something from MAST.CAT
  157. you do so by erasing the file from the diskette it is
  158. on, then cataloging that disk.  If you crash a disk and
  159. want to erase all it's entries from the catalog, you have
  160. to edit a dummy 'NAMES.SUB' with just the disk name in it,
  161. then execute 'UCAT' which will be faked into thinking you
  162. are cataloging an empty disk.  This will cause all entries
  163. for the disk to be erased.
  164.  
  165.                 EXAMPLE:
  166. Suppose disk '-WORK.023' crashed, and you want to delete
  167. all references to it from MAST.CAT.  (you might first want
  168. to do 'CAT *.* *.023 to see what was lost).  Edit NAMES.SUB
  169. and place the following single line in it:
  170. -WORK.023
  171. then run UCAT.  This will result in all files referring to
  172. -WORK.023 being erased.
  173.  
  174. -------------------------------------------------
  175.                 N O T E S
  176. -------------------------------------------------
  177.  
  178. The UCAT program creates a file 'NEW.CAT', and ONLY
  179. when the update appears to be successful, does it do
  180. the following functions internally:
  181.  
  182.         ERA MAST.BAK
  183.         REN MAST.BAK=MAST.CAT
  184.         REN MAST.CAT=NEW.CAT
  185.  
  186. Thus, there are 3 versions of the catalog on your disk at
  187. one time:  MAST.BAK, MAST.CAT, AND NEW.CAT, so if your disk
  188. is low on space, you may sacrifice this integrity, and manually
  189. ERA MAST.BAK before running UCAT.  The program could
  190. also be modified, to do the erase first.
  191.  
  192.  
  193.  
  194.  
  195. -------------------------------------------------
  196. -------------------------------------------------
  197.  
  198.  
  199. QCAT was submitted subsequently, with the following comments:
  200.  
  201. QCAT allows cataloging disks on a 1 disk system.
  202. You type QCAT, and the program asks you to mount the
  203. disk to be cataloged, and press a D.  You do so.  It
  204. then tells you to mount the catalog disk, and press return.
  205. You do that.  This causes a "NAMES.SUB" file to be written
  206. to the catalog disk.  Type: UCAT which will then execute the
  207. catalog updating program, which alphabetically merges
  208. NAMES.SUB with the file MAST.CAT, then erases the NAMES.SUB
  209. file.
  210.  
  211. NOTE that each disk to be cataloged must have a file
  212. "-diskname.serial" (such as "-MAC.005").  When the list
  213. of names on the disk is sorted, the leading "-" on this
  214. filename causes it to be sorted first.  It is then taken
  215. as the disk name and serial, and is written to the master
  216. catalog next to each filename on the disk.
  217.  
  218. You are referred to the previous documentation on the
  219. cataloging system for more details.
  220.  
  221. ------
  222.