home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / packet / bis_v20.arc / BIS-V20.DOC next >
Text File  |  1988-09-25  |  20KB  |  402 lines

  1.  
  2.  
  3.  
  4.              ADDITIONAL DOCUMENTATION FOR BIS VERSION 2.0
  5.  
  6. There have been some major changes in BIS V2.0 and how it performs the
  7. search function.  You will need to change your BIS.CNF file if
  8. you have been running a previous version of the program.  It is best to
  9. completely read this documentation before making the changes as there
  10. are options available to you which were not previously.  As mentioned
  11. in previous documentation, if you have a problem running BIS, it is
  12. MORE THAN LIKELY a problem with the configuration file.  In questions I
  13. have received about BIS, this held true and it probably will in the
  14. future.  In order to understand the configuration file, you should
  15. completely understand the documentation, both for the previous version
  16. and now version 2.0.  So hold onto your seats, here we go!
  17.  
  18. First, it is important to understand that the new version of BIS now is
  19. capable of calling functions other than SEARCH TIME and DATE.  It is
  20. up to you to develop the other functions you may wish to do which will
  21. take the form of DOS commands or external programs.  The original
  22. intent of BIS, as its name implies, was to act as an interface between
  23. the MBL BBS program and other programs a user can call by using the BBS. 
  24. Originally BIS was limited to only the three functions, but now the
  25. type and number of functions is basically unlimited.
  26.  
  27. Be careful, however, in installing these alternative functions.  Some
  28. may act very unpredictably if conditions are not set properly.  You
  29. need to have a pretty good idea of what you are doing.  Some may not
  30. work at all and some may only partially work.  ANY PROGRAM OR DOS
  31. COMMAND WHICH REQUIRES USER INPUT WHILE RUNNING WILL NOT WORK unless it
  32. is specifically designed to take input from the COM port in use.  More
  33. about preparing for alternate programs and commands later.
  34.  
  35. CHANGES
  36. Other than the capability mentioned above, there have been some other
  37. changes to BIS which have improved upon previous versions.
  38.  
  39. EXTRA LINE FEED
  40. Searches now have an extra blank line between files when more than one
  41. "find" is made in the SEARCH function.  This makes output much more
  42. readable on the remote computer.
  43.  
  44. BIS DISPLAY
  45. BIS activity is now displayed on screen in the SEARCH function.  You
  46. can see what is being sent to the user and the information sent by the
  47. BIS program.  There is a built in delay of approximately five seconds
  48. when BIS completes its functions and returns to the BBS program to
  49. allow the SYSOP time to see the last information passed on by BIS. 
  50. Essentially this delay will be unnoticed by the user because the
  51. display is usually ahead of TNC output.
  52.  
  53. NO LONGER USES DOS REDIRECTION TO COM PORT FOR SEARCHES
  54. Previous versions of BIS called the FGREP search program to complete
  55. the searches by directing FGREP's output to COM 1 or 2.  This is no
  56. longer the case.  Instead, FGREP's output is directed to a disk file
  57. and then BIS reads the disk file and moves it out the COM port.  This
  58. should relieve some of the problems in timing etc. that some sysops
  59. experienced with the original version.
  60.  
  61.                                     -2-
  62.  
  63. STRIPS GARBAGE CHARACTERS
  64. Redirecting FGREP's output to a file has the additional advantage of
  65. allowing BIS to do some editing prior to sending it out the COM port. 
  66. One of the problems experienced by sysops in previous versions was
  67. FGREP's nasty tendency to insert some garbage characters if the SEARCH
  68. "find" was the first line of a particular file.  The temporary fix was
  69. to edit the file with a blank line at the top or use FGREP's "-w"
  70. option.  Unfortunately, using the "-w" option meant two letter word
  71. searches meant exactly that instead of allowing BIS to insert a space
  72. before and after the two letters and also made two word searches like
  73. for "Kansas City" or "New Orleans" impossible because it strips the
  74. space.  BIS 2.0 instead strips the garbage characters out of the
  75. temporary file before sending them out the COM port.
  76.  
  77. TWO LETTER WORD SEARCHES
  78. As you know if you have used previous versions of BIS, the program
  79. inserts a space before and after the two letter word before calling
  80. upon FGREP to do the search.  This is to allow for searches in
  81. databases which contain two letter state abbreviations.  Some
  82. encountered the problem that the program then wouldn't find matches in
  83. files where the two letter state abbreviation was at the end of the
  84. line.  Most of the digi and bbs lists that I have seen do not have the
  85. state at the end of the line, but somewhere in the middle, so those
  86. worked fine.  If you have that problem, you have one of two choices. 
  87. Either modify the database with a space at the end of each line or use
  88. the "-w" option to call FGREP in that particular section of your
  89. BIS.CNF file.  This will effectively strip the spaces that BIS inserts
  90. but has the disadvantage of matching anything in the file that has
  91. those two letters in it.  Having a user insert a space at the beginning
  92. of the search word will have no effect since FGREP will strip it out. 
  93. So the first option is probably the better.  I struggled with this
  94. problem for some time, but there is just no way to do it short of
  95. forcing two or three calls to FGREP...one to search for " NY "; one to
  96. search for "NY<CR>"; and perhaps one to search for "NY."  FGREP does
  97. not accept choices.  It is one way or the other.
  98.  
  99. BIS CONFIGURATION FILE EXPANDED
  100. The configuration file BIS.CNF is now expanded to essentially as
  101. many sections you wish, depending upon available memory.  Each section
  102. does require some memory, however.  BIS is allocated 64 K for string
  103. storage, so this must be a consideration.  Even without the additional
  104. feature of allowing other external programs to run, folks were asking
  105. for additional sections, so this change should be of help.
  106.  
  107. RAM DISK OPTION
  108. As mentioned, previously, BIS redirects FGREP's search output to a
  109. temporary file called "BIS_FILE.000.  If all goes well you should never
  110. see this file in your directory because BIS deletes it before returning
  111. control back to the BBS program.  YOU MUST DESIGNATE THE DIRECTORY OR
  112. SUBDIRECTORY TO STORE THIS FILE in your BIS.CNF file in the third line
  113. of the first section.  In previous versions of BIS, this line was used
  114. to tell DOS where to find BIS again after a search but this version of
  115. BIS does not change directories.  So instead, the line designates where
  116. to store BIS_FILE.000.
  117.  
  118.                                     -3-
  119.  
  120. You may wish to use a RAM DISK instead of your hard disk to store this
  121. file as it makes the program run much faster and requires no writes to
  122. your hard disk.  If so, keep in mind the amount of space needed by the
  123. program to store search results.  Should the search output exceed the
  124. ram disk allocation, the BIS program will abort and should return back
  125. to the BBS program again giving the usual prompt to the user.  Be
  126. certain to USE A BACK-SLASH "\" as the last character in this line.
  127.  
  128. CHOICE OF SHOWING FULL PATH OR FILE NAMES ONLY ON SEARCHES
  129.  
  130. BIS now gives you the option of sending the user the full path name to
  131. the file which contains the "find" or only the file name itself. 
  132. Originally only the file name was shown.  If the full path name is
  133. allowed, be certain your users understand they may only have to use a
  134. portion of the path to download a file.  For example, if your BBS ARRL
  135. files are stored in a deeply nested subdirectory but MBL BBS program
  136. only needs the last two subdirectories to find the file, giving the
  137. full path name for a download would result in the BBS program giving a
  138. "Not Found" error to the user.  The PATH OPTION IS SPECIFIED ON LINE
  139. FOUR of the BIS.CNF file and must be either YES for full path names or
  140. NO in caps.
  141.  
  142. THE CONFIGURATION FILE
  143. Only two changes to the BIS.CNF file are MANDATORY for this version to
  144. run as desired.  Both changes are in the first section of six lines. 
  145. The first required change is the directory to store the temporary
  146. BIS_FILE.000 and is on the third line.  The second change is the path
  147. option on line four.  Remember this file must contain sections of six
  148. lines each, the sixth line being a series of ten dashes.  There should
  149. be no leading or trailing spaces on each line other than what is
  150. allowed in the SEARCH sections.  The format should be exactly as shown
  151. in the sample configuration file.
  152.  
  153. PORT DRIVERS
  154. BIS runs fine with COMBIOS or DVIOCOM.  It does not apparently work
  155. with MBBIOS.  Various reports of success have been heard from users of
  156. the multi-port drivers.  Since I do not use any of those drivers, I am
  157. not able to check those.  Keep in mind with multi-port drivers that BIS
  158. still works only on COM1 and COM2.
  159.  
  160. RUNNING OTHER PROGRAMS UNDER BIS (OR LET THE FUN BEGIN!)
  161. If you have guts and your computer sufficient memory, you can now use
  162. BIS to run other executable programs, batch files and yes, even BASIC
  163. programs!  Unless the external program has its own method of taking
  164. input from the COM port, these programs cannot expect user input during
  165. execution.  However, BIS provides up to 6 parameters which you may use
  166. in running your program.
  167.  
  168. Recall for a minute using BIS's SEARCH FUNCTION.  The syntax of the
  169. command is: 
  170. FUNCTION; DATABASE OR FILE NAME; SEARCH WORD
  171.  
  172. In reality, the SEARCH WORD may be two words, yielding in reality two
  173. parameters.  Thus the command might look like this:
  174. SEARCH HAMS KANSAS CITY
  175.  
  176.                                     -4-
  177.  
  178. So, effectively there are 4 parameters used in finding the correct
  179. search word specified by the user during a SEARCH.  BIS will supply
  180. these four parameters to your program and in addition, supplies two
  181. others, the COM port in use and the users call sign.
  182.  
  183.       PARAMETER LABELS
  184.  
  185. $1  COM port                       For purposes of the BIS.CNF file,
  186.                                    the table at left shows all 6 of
  187. $2  Call sign                      the parameters available to call
  188.                                    your program.  You probably won't
  189. $3  FUNCTION (user supplied)       use the Function parameter as it
  190.                                    is mainly used internally by BIS
  191. $4  First param (user supplied)    to find the function desired in
  192.                                    the BIS.CNF file.
  193. $5  Second param (user supplied)   Label $3 corresponds to the word
  194.                                    "SEARCH" when BIS does the SEARCH
  195. $6  Third param (user supplied)    function; $4 corresponds to the
  196.                                    database; $5 corresponds to the
  197.                                    first search word; and $6 to the
  198.                                    second search word.
  199.  
  200. In the BIS.CNF file, each external program will have its own unique
  201. FUNCTION name.  BIS will then search the BIS.CNF file for the function
  202. and execute the program named in that section.
  203.  
  204. If your program has user output, you have your choice of methods in
  205. sending it if the program itself doesn't have a method.  The output can
  206. be redirected to the COM port (specified by "$1") or can be redirected
  207. to BIS_FILE.000.  Although DOS redirection will work in most instances,
  208. you are probably safer redirecting the output to BIS_FILE.000 which BIS
  209. will send out the COM port when the external program has finished
  210. executing.  One of the reasons SEARCH output was changed from COM port
  211. redirection in version 1.x to file redirection in version 2.0 of BIS
  212. was because of some of the problems people encountered with the former
  213. method.
  214.  
  215. Take a few minutes to look over the sample BIS.CNF file supplied with
  216. this program, in particular, the last few sections which specify
  217. functions other than SEARCH.
  218.  
  219. As in the SEARCH function sections, these sections have six lines each,
  220. the last line of which must be a series of ten dashes or hyphens (not
  221. the underline character).  Actually six dashes will do it, but ten are
  222. in for good measure.  The fifth line is unused and is present only to
  223. maintain consistency with the SEARCH functions.
  224.  
  225.  
  226.  
  227. DIRECT                                  As in the example at left, the
  228. DIR C:\BBS\FILES > COM$1:               first line is the name of the
  229. ACCEPT ONLY: W9LZQ                      FUNCTION.  When a user types the
  230. REJECT ONLY: NONE                       OS command in the MBL BBS
  231. NOT USED                                program, it is the next word
  232. ----------                              after "OS".  It may be any word
  233.                                         you desire, but MUST be different
  234. than any of the other functions in the BIS.CNF file.  Additionally, it
  235.  
  236.                                     -5-
  237.  
  238. obviously cannot be "SEARCH"; "VERSION" (undocumented function);
  239. "TIME"; or "DATE", since these are all previously defined BIS
  240. functions.  "TIME" and "DATE" are internal functions of BIS.  The
  241. second line ("command line", for lack of a better name) is the line to
  242. call your program and pass any parameters to it.  The third line allows
  243. you to insert call signs of stations who will have access to this
  244. function IF it is to be limited to only specified stations.  The fourth
  245. line allows you to insert call signs of stations who MAY NOT use the
  246. function.  If there is a call sign entered on either line, the word
  247. "NONE" (in caps) must be deleted.  If the line is to be ignored, the
  248. word "NONE" must be on the line.  If "NONE" is entered on both the
  249. third and fourth lines, all stations will have access to the command. 
  250. The two lines are mutually exclusive.  That is, if a call sign is
  251. entered on one of the lines, the other line MUST NOT have call signs on
  252. it and MUST have the word "NONE" entered on it instead.
  253.  
  254. In the example above, the FUNCTION called is "DIRECT".  The command BIS
  255. calls is in the second line and calls the internal DOS function:
  256. DIR C:\BBS\FILES which is redirected out the COM port in label $1. 
  257. Station W9LZQ is the only call sign allowed to use the function.  The
  258. MBL BBS command to call this function would therefore be:
  259.  
  260. OS DIRECT
  261.  
  262. Another example:
  263.  
  264.                                          In this case, the FUNCTION is
  265.                                          called "WHAT" (makes sense,
  266. WHAT                                     doesn't it?).  The command line
  267. DIR $4 > D:\BIS_FILE.000                 calls the DOS function "DIR"
  268. ACCEPT ONLY: W9LZQ                       again, but this time with a
  269. REJECT ONLY: NONE                        twist. Here, the directory must
  270. NOT USED                                 be specified by the user when he
  271. ----------                               calls the function.  Also, you
  272. note that this time the output is directed to BIS_FILE.000 which BIS will
  273. read and send out the COM port when the external program finishes.  When
  274. the user requests the WHAT function, he (or she) must supply an
  275. additional parameter ($4) or the function will merely output a listing
  276. of the current directory. Here, the MBL BBS program OS command would
  277. look something like:
  278.  
  279. OS WHAT C:\JOKES\SICK
  280.  
  281. which sends to file BIS_FILE.000 for later output, the files in the
  282. "SICK" subdirectory of the "JOKES" directory.
  283.  
  284. Want to run a program written in BASIC?  Here is how its done:
  285.  
  286.                                         The function is called "TEST"
  287.                                         which calls BASIC and tells it to
  288. TEST                                    run "TEST.BAS" and send its
  289. BASIC TEST > COM$1:                     output to the COM port specified
  290. ACCEPT ONLY: NONE                       in label $1.  In this case, any
  291. REJECT ONLY: W9LZQ                      user can call the function except
  292. NOT USED                                poor W9LZQ, alas!  The MBL BBS                           
  293. ----------                              command to call the function is:
  294. *NOTE: Use the name of your BASIC       OS TEST.
  295. interpreter.
  296.  
  297.                                     -6-
  298.  
  299. You may also call Batch files for execution from BIS.  The next example
  300. in the sample BIS.CNF file demonstrates how to do that with the
  301. FUNCTION, "INFORMATION".
  302.  
  303. In the next section (FUNCTION "NEW") any user can read a file stored in
  304. the \BBS subdirectory called "WHATSNEW", where the output is first
  305. redirected to D:\BIS_FILE.000 and then read by BIS and sent out the COM
  306. port.
  307.  
  308. The final example, the LOG FUNCTION demonstrates how to use a batch
  309. file for what may be a very useful function, reading the BBS log for a
  310. given date.  The .BAT file first makes use of FGREP.COM to do the
  311. initial search and then calls the program named READLOG.EXE to
  312. eliminate improper entries found by FGREP, sending its output to the
  313. BIS read file, BIS_FILE.000. The syntax of the OS command is: OS LOG xxdd
  314. Where xx = month and dd = day
  315.  
  316.   BIS.CNF SECTION
  317.  
  318. LOG
  319. DOLOG.BAT $4
  320. ACCEPT ONLY: W9LZQ W9HWQ WD9GCR
  321. REJECT ONLY: NONE
  322. NOT USED
  323. ----------
  324. * Note: "DOLOG.BAT" is in the current directory
  325.  
  326.  
  327.   DOLOG.BAT
  328.  
  329. ECHO OFF
  330.  
  331. REM DOLOG.BAT WORKS IN CONJUNCTION WITH BIS.EXE BBS PROGRAM.
  332. REM SEND LOG INFORMATION FOR USER PROVIDED DATE (xxdd).
  333. REM FIRST CALLS FGREP.COM TO DO A QUICK SEARCH OF THE LOG FILE
  334. REM  AND REDIRECTS ITS OUTPUT TO "BIS_FILE.000".
  335.  
  336. FGREP -sx %1 \BBS\LOG\LOG.BBS > D:\BIS_FILE.000
  337.  
  338. REM COPY "BIS_FILE.000" TO A DIFFERENTLY NAMED FILE
  339. REM   (you may wish to modify this, depending upon whether
  340. REM   or not you are using a RAM disk and how much space it
  341. REM   has allocated).
  342.  
  343. COPY D:\BIS_FILE.000 C:\BBS\TEMPFILE.000
  344.  
  345. REM CALL READLOG.EXE TO ELIMINATE FALSE FINDS FROM FGREP'S OUTPUT
  346. REM   AND REDIRECT OUTPUT TO "BIS_FILE.000".
  347.  
  348. READLOG.EXE %1 C:\BBS\TEMPFILE.000 > D:\BIS_FILE.000
  349.  
  350. REM DELETE TEMPFILE.000 THEN
  351. REM EXIT BACK TO BIS WHERE BIS_FILE.000 WILL BE SENT OUT COM PORT.
  352.  
  353. DEL C:\BBS\TEMPFILE.000
  354.  
  355.                                     -7-
  356.  
  357. Using the LOG FUNCTION, I can remotely check the log for entries during
  358. any particular day and so can assistant Sysops.  The READLOG.EXE
  359. program and the DOLOG.BAT file are included on the BIS version 2.0
  360. distribution diskette, however, you will have to edit the .BAT file to
  361. suit your particular system.  It should probably go in the same
  362. subdirectory, along with READLOG.EXE in which your BBS program is
  363. located.  Remember also that the LOG FUNCTION and READLOG.EXE do not
  364. work with earlier versions of the MBLBBS program because the log format
  365. was changed in the last version.
  366.  
  367. Incidentally, you can run READLOG.EXE as a stand-alone program locally,
  368. although it is extremely slow without using FGREP.COM first.  It also
  369. has one additional optional parameter which will allow its output to
  370. the screen to pause if you use it locally.  Don't include the parameter
  371. when it is being called via the COM port.  The command syntax is:
  372.  
  373. READLOG.EXE mmdd [/P]
  374.  
  375. As a final note to the discussion about sections, remember that on line
  376. 2 of the functions other than SEARCH, you an mix and match parameters
  377. and labels in any sequence you need to call your external program.
  378.  
  379.  
  380. SUMMARY
  381.  
  382. BIS Version 2.0 provides you the capabilities to do a wide variety of
  383. things at the command of your users.  But it is up to you to develop
  384. the applications!  If you come up with some good ones, let me know.  If
  385. they provide a useful needed function, I will include them on the BIS
  386. distribution diskette if you send a copy to me.  Also, I plan on
  387. distributing applications which can be used in conjunction with BIS on 
  388. an individual disk if I receive a few from MBL BBS sysops, so if you send
  389. one, please include necessary documentation.
  390.  
  391. Finally, I would like to thank those of you who offered suggestions for
  392. improvement of BIS.  Most of them have been incorporated into this
  393. version and should make for a much nicer BBS Interface System.
  394.  
  395. Definitely remember to register your program.  It is the only way I have
  396. of notifying you of updates.  You will find the registration form as a
  397. separate document on the distribution disk.  Comments and suggestions
  398. made on the registration form will be much appreciated.
  399.  
  400.  
  401.  
  402.