home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / OPUS / OASWAP01.ZIP / OASWAP.DOC next >
Encoding:
Text File  |  1991-04-22  |  7.1 KB  |  166 lines

  1.                                                          __
  2. --------  Swap order of two message and/or file areas   /  \ Micro
  3.  OASWAP   for Opus 1.1x sysops, v01 released 22-APR-91  \__/ Magic
  4. --------  Copyright 1991 by Keith Ford (1:373/12)       [__]  BBS
  5.  
  6.  
  7. OASWAP will allow an Opus sysop to interchange the order of two
  8. system areas.  Message and File information can be swapped individually
  9. or together.
  10.  
  11. I wrote OASWAP to help keep my areas in a sensible (to me) order.
  12. My file areas are fairly stable, but I am always adding and removing
  13. echos.  OASWAP allows me to rearrange message area order without
  14. disturbing my file area order.
  15.  
  16. FREQ the latest version from 1:373/12 with magic word OASWAP.  Send
  17. comments, bug reports, and suggestions here as well.
  18.  
  19. A test mode is available where OASWAP will not execute the command
  20. but simply display what would be done.  Option '-T'.
  21.  
  22. A quick list option will display a quick list of the titles for all
  23. of the message and file areas.  Option '-L'.
  24.  
  25. Options allow Alternate Menus, Barricade File Path, and Area Attributes
  26. to be moved also.  Option '-I{MBA}'.
  27.  
  28. The last read pointers and the last message area accessed pointer can
  29. be updated as well.  Option '-U'.
  30.  
  31. I don't use alternate menus or barricade file paths, so OASWAP may
  32. need some enhancements to better handle these.  Please let me know if
  33. you have ideas.  Although they are options, I cannot think of a reason
  34. why you would swap message areas and not swap area attributes or update
  35. the last read pointers.  OASWAP will spit out a warning if you do
  36. decide to not use these options when swapping message areas.
  37.  
  38. OASWAP must be run in the directory where your SYSTEM##.DAT and USER.DAT
  39. files are located.
  40.  
  41. OASWAP will only swap two existing areas.  If you want to move an area
  42. out of the way for a moment, you will need to create a dummy area with
  43. something like OMAN and put it out of the way.
  44.  
  45. Note, at most, the only files modified by OASWAP will be OASWAP.LOG,
  46. SYSTEM##.DAT, and USER.DAT.  Any programs or files that make use of
  47. area numbers may require updating to work properly with your newly
  48. reordered areas.  The following are known to have dependencies on
  49. this information:
  50.  
  51.     FILES            PROGRAMS
  52.     ~~~~~~~~~~~~        ~~~~~~~~~~~~~~~
  53.     ECHO.CTL        KRAMMAIL
  54.     BBS.CTL            O_RENUM
  55.                 XLIST
  56.                 OPUS-FAM
  57.  
  58.  
  59. Entering OASWAP without any arguments will cause a usage screen
  60. to display.  This screen is shown below.
  61.  
  62. Usage:  OASWAP area# area# [-M] [-F] [-I{MBA}] [-U] [-T] [-L]
  63.  
  64.    area# : decimal (not hex) value for area number
  65.    -M    : swap the message information
  66.    -F    : swap the file information
  67.    -I    : include the following in the swap
  68.       M  :   alternate menu file extension
  69.       B  :   barricade file path
  70.       A  :   area attributes (message types)
  71.    -U    : update last read pointers in user database
  72.    -T    : test mode, show what would be done, but don't do it
  73.    -L    : quick list all areas (other arguments ignored)
  74.  
  75. The author, an Opus sysop himself, recommends you make backup copies
  76. of certain files before using OASWAP.  I performed CRC checks on these
  77. files, ran OASWAP a number of times, used the log to undo everything,
  78. and re-ran the CRC checks.  Everything returned to it's original state.
  79. I trust OASWAP, but I had this uncle named Murphy that once said... <grin>
  80.  
  81. Make backups of - all SYSTEM##.DAT
  82.                 - USER.DAT
  83.  
  84. OASWAP.LOG will record all commands that are executed along with the
  85. date and time.  If the command fails, it will be noted with a reference
  86. to a command failure note listed in this document.  Replaying these
  87. commands in 'reverse' order will UNDO changes you have made, assuming the
  88. failures are not fatal to the system.  Keep backups!
  89.  
  90. Programmers note:  
  91. If you look at the Otoolkit data structures, the "Reserved filler"
  92. elements are not modified or moved.  I assume they are empty.
  93.  
  94. If the command fails, it will list a note number to refer to.  To better
  95. understand the extent of this failure, here is psuedo code for that part
  96. of the program.
  97.  
  98.     open SYSTEM##.DAT for first area, if error quit with failure(0)
  99.     write to SYSTEM##.DAT for first area, if error quit with failure(1)
  100.     close SYSTEM##.DAT for first area, if error quit with failure(2)
  101.     - by this time, half the swap has been completed
  102.     open SYSTEM##.DAT for second area, if error quit with failure(3)
  103.     write to SYSTEM##.DAT for second area, if error quit with failure(4)
  104.     close SYSTEM##.DAT for second area, if error quit with failure(5)
  105.     - by this time, the swap is nearly complete
  106.     open USER.DAT to update pointers, if error quit with failure(6)
  107.     - swap completed successfully
  108.  
  109. COMMAND FAILURE NOTES:  If you receive one of these failures, you
  110. should try to determine why OASWAP had problems with the file
  111. I/O operations being attempted.  Failures 1-7 may have caused some
  112. damage to the data files you were asked to back up eariler.
  113.  
  114. 0 - failed trying to open SYSTEM##.DAT file for first area
  115. 1 - could not write to SYSTEM##.DAT file for first area
  116. 2 - could not close SYSTEM##.DAT file for first area, 
  117. 3 - could not open SYSTEM##.DAT file for second area
  118. 4 - could not write to SYSTEM##.DAT file for second area
  119. 5 - could not close SYSTEM##.DAT file for second area
  120. 6 - could not open USER.DAT
  121.     last read pointers and last message area accessed pointer not updated
  122. 7 - fseek to modify a user record in USER.DAT failed
  123.  
  124.  
  125. For whatever it is worth, here is a list of possible error and warning
  126. messages that OASWAP may produce.
  127.  
  128.   ** ERROR: extra -T argument found
  129.   ** ERROR: extra -U argument found
  130.   ** ERROR: extra -F argument found
  131.   ** ERROR: extra -M argument found
  132.   ** ERROR: extra -I argument found
  133.   ** ERROR: extra (-I)A argument found
  134.   ** ERROR: extra (-I)B argument found
  135.   ** ERROR: extra (-I)M argument found
  136.   ** ERROR: unknown -I argument
  137.   ** ERROR: extra area number argument found
  138.   ** ERROR: unknown argument
  139.   ** WARNING: attributes not being moved with message areas
  140.   ** WARNING: lastread pointers not being updated for moved message areas
  141.   ** ERROR: message area not being moved with attributes
  142.   ** ERROR: lastread pointers being updated for unmoved message areas
  143.   ** ERROR: no -M or -F specified
  144.   ** ERROR: no area numbers specified
  145.   ** ERROR: only one area number specified
  146.   ** ERROR: same number specified for both areas
  147.   ** ERROR: cannot open area1 for write
  148.   ** ERROR: cannot open area2 for write
  149.   ** DATA OKAY (see documentation note 0)
  150.   ** ERROR: cannot write to filename1
  151.   ** DATA MAY BE CORRUPTED (see documentation note 1)
  152.   ** ERROR: cannot close filename1
  153.   ** DATA MAY BE CORRUPTED (see documentation note 2)
  154.   ** ERROR: cannot open filename2 for write
  155.   ** DATA MAY BE CORRUPTED (see documentation note 3)
  156.   ** ERROR: cannot write to filename2
  157.   ** DATA MAY BE CORRUPTED (see documentation note 4)
  158.   ** ERROR: cannot close filename2
  159.   ** DATA MAY BE CORRUPTED (see documentation note 5)
  160.   ** ERROR: cannot open USER.DAT for modification
  161.   ** DATA MAY BE CORRUPTED (see documentation note 6)
  162.   ** ERROR: fseek failed in USER.DAT
  163.   ** DATA MAY BE CORRUPTED (see documentation note 7)
  164.  
  165. Enjoy!
  166.