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 / CPM / PROGRAMS / WSTAR / LONGDOCS.TXT < prev    next >
Text File  |  2000-06-30  |  7KB  |  136 lines

  1. THE LONG AND SHORT OF WORDSTAR DOCUMENT FILES
  2. by Bob Rosenfeld, SLKUG, August 1987
  3.  
  4. (How to work with large files and WordStar)
  5.  
  6. My major project, for the last few months, has been to inventory
  7. my books, VCR tapes, audio cassettes, and magazines (the ones
  8. that I save until they mold in the basement.)  Because of the
  9. magnitude of the book inventory, I have split it into two main
  10. categories:  COOK BOOKS (about 300 of them), and OTHER BOOKS
  11. (about 2500 in more than 65 file transfer boxes.)
  12.  
  13. I suppose dBASE II would have been a more logical choice for
  14. software, but although I have played around with it, I don't feel
  15. as comfortable with dBASE as I do in good old WordStar.  The
  16. short inventories that I have run before, amounted to ten pages
  17. or less --- easily handled by WordStar --- but with the BOOK
  18. inventory I have a list that covers 50 pages .... and I'm still
  19. going.  Major problems:  searching for duplicate books; jumping
  20. from one end of the file to the other; and saving the file.  It
  21. takes several minutes for each search.  These problems were just
  22. an inconvenience compared with the worst problem:  not having
  23. enough room on the disk to allow the file to be searched or
  24. saved.
  25.  
  26. I ran into trouble when the file on my Kaypro 10 reached 186K
  27. bytes.  Okay, so the disks hold 390K bytes in theory, right? 
  28. That is what it says when I check a freshly formatted floppy's
  29. empty directory with D.COM.  You'd better not believe that you
  30. can use the 390K bytes if you are working on a file.  The space
  31. required is actually three times the size of your file.  First,
  32. there is the space the file itself occupies.  Second, there is
  33. the back-up file (marked with the extension BAK on the disk
  34. directory.)  It takes up the same amount of space as the file did
  35. before revision.  Third, when saving a file, the computer can
  36. require just as much space as the file itself for temporary
  37. storage while the process is being completed.  When you search a
  38. file, the same thing happens.  The computer requires as much
  39. space as the original file, temporarily, until the search is
  40. completed.
  41.  
  42. I worked on the inventory file using my hard disk, and then
  43. copied it to an empty floppy.  That meant there was no BAK file
  44. taking up space on the floppy.  I had some additions to make to
  45. the file that added about a page (about 9K.)  Well, 390K divided
  46. in half is 195K, but I ran out of space searching a file of 186K. 
  47. As a result I lost about two hours work.  Much like the confirmed
  48. atheist, it couldn't be saved.  In desperation, I called Ken
  49. Seger for help.  He came to the rescue with the suggestion of
  50. using TXTSAVE.LBR or RESQ14.COM (from the SLKUG club disk #44.) 
  51. I tried those programs, but alas, it was too late.  The demise of
  52. the inventory of Book Box #65 had taken place.  I used NULU to
  53. extract the utility files from TXTSAVE.LBR.  Then I used
  54. WS3SAVE.COM (when you call it up, you get the simple instructions
  55. on how to use it.)  It only brought back the middle of the file,
  56. the inventory of Boxes #40 through #47.  Thank goodness, I had
  57. backed up the file at the end of my last inventory effort.  The
  58. list, including Box #64, was safe.  Now, I am reinventorying Box
  59. #65.  I have learned several things through this exercise in
  60. frustration:
  61.  
  62. 1.  Periodically, save with 2KS.
  63.  
  64. 2.  Don't put all your eggs in one basket -- split up your long  
  65.   files.
  66.  
  67. 3.  Use back-up disks.
  68.  
  69. With these three maxims in mind, you may save Ken Seger the
  70. opportunity to help you out, and save your own temper and sanity
  71. as well.
  72.  
  73. I am so remiss in saving my files that I have dedicated two "el
  74. cheapo" alarm wrist watches for reminders.  These are the kind
  75. that emit a little whimper, a single "beep", every hour, and give
  76. a never-ending series of beeps when the alarm goes off (this
  77. always occurs during the very quiet musical passages at a
  78. symphony concert.)  The time settings on the watches are set half
  79. an hour apart.  In this way, I get a beep every half hour.  When
  80. I get beeped, I SAVE!!  Even in the middle of a sentence, I SAVE! 
  81. Even while I am in deep thought with my eyes closed (Henry calls
  82. this napping, I call it meditation), the beep sets off the
  83. conditioned response to SAVE!  I hit 2KS, and after the save, it
  84. is followed by 2QP that puts me right back where I was (but not
  85. necessarily with my eyes closed.)  Now, this is the right thing
  86. to do (it says so in the "Good Book", the Kaypro User's Manual.) 
  87. But for long files, saving takes such a long time that it could
  88. result in a resumption of somniferousness.  To avoid this we go
  89. to the next rule:
  90.  
  91. Use short files!  With my 65 boxes of books, I had to resort to
  92. subterfuge.  I create a separate file each time I start to
  93. inventory another box.  The main file is called INVENTOR.BKS (for
  94. INVENTORY of BOOKS.  I called the sub-files INVBOX65.BKS, for
  95. INVENTORY of BOX #65 of BOOKS.  When I finish inventorying and
  96. saving the file of Box #65, I go to the main file, INVENTOR.BKS,
  97. and set the cursor at the end of the file.  Then I use 2KR.  When
  98. I get the prompt asking what file I want to read, I enter
  99. A:INVBOX 65.BKS.  Wordstar then picks up a copy of the sub-file,
  100. INVBOX65.BKS, and writes a copy of it at the end of the main
  101. file,INVENTOR.BKS.  I immediately use 2KD to save the main file,
  102. and to exit the file so I can open a new sub-file, INVBOX66.BKS,
  103. for the next box to be inventoried.  Once the sub-file is
  104. recorded into the main file, AND YOU HAVE VERIFIED THAT IT IS
  105. INDEED THERE, you can erase the subfile from the working disk.
  106.  
  107. Now here comes the part that shows you how really chicken I am. 
  108. Since I have a hard disk, I do my work on the hard disk (Drives
  109. "A" or "B".)  It is a lot faster to use the hard disk rather than
  110. the floppy.  I am less likely to run out of space.  I keep a
  111. floppy disk in Drive "C", using the "O" command from the main
  112. Wordstar menu.  It will ask me if I want to overwrite the
  113. existing file, C:INVENTOR.BKS.  With fear and trembling in my
  114. heart, I hit the "Y" (for "YES") and let it do its thing.  Only
  115. when I check the final result on the floppy, calling up the file
  116. C:INVENTOR.BKS, and find that Box #65 is indeed listed, do I give
  117. a sigh of relief, and go on with the next sub-file for Bos #66.
  118.  
  119. Actually, if you know how big the main file was before the
  120. addition, all you really have to check is that the size of the
  121. sub-file has been added to the size of the main file.  To some
  122. "Doubting Thomases", seeing's believing.  I look for Box #65 at
  123. the end of the main file before I erase the sub-file from my hard
  124. disk.  
  125.  
  126. A word of WARNING!  Don't do work on a file that is going to be
  127. longer than half the space left on the disk.  This means 195K
  128. maximum, when starting with a freshly formatted empty floppy DSDD
  129. disk.  Do your work on a separate disk, and keep adding the short
  130. sub-files to the main file if it is to exceed half the available
  131. space.  You can always copy a file, using the PIP commands, or
  132. using the "O" in Wordstar, to fill a whole disk of 380+ bytes,
  133. but you can't make changes on that disk and save them if the file
  134. length is more than half the capacity of WHAT IS LEFT on that
  135. disk.
  136.