



     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================


               This file contains examples of tricks & traps while
               planning your configuration file and lists. 


     CONFIGURATION FILE
     ==================

          The .CFG file may have comments: ie.

     C:\WC3O\ROTATE\HELLO\          this is a legal comment for line 1.
      this is a legal comment in place of line 2. Note the leading space!
     this is NOT a legal comment for line 3. Note the LACK of a leading space!
     C:\WC3O\ROTATE\GOODBYE\ 4 this is a legal comment
     C:\WC3O\ROTATE\HOLIDAY\5 this is NOT a legal comment

      This is legal for line 7. Note a blank line is legal for line 6.
     C:\WC3O\ROTATE\HOLIDAY\        8 -INPUT Path: VARIABLE HOLIDAY SCR files
        etc. Lines 9 to 20 skipped for brevity.
     COPYIT.BAT                     21-BATch file you must execute.

          Line 21 is the ONLY line which is REQUIRED (although if the remainder
          are not used, why run the program?). It MUST be a legal dos BATch
          filename! Very little error checking here. If the program DOES find an
          error in the batch filename, it will HALT with an error.

          The program does NOT check for proper PATHS and FILENAMES. It will
          HALT if a bad filename is specified for COPYIT.BAT or if the first 8
          lines do NOT contain "\" -- as will the example line 5 above.


     HOLIDAY LISTS
     =============

          below: The Variable Holiday list may have comments. ie.

     09293,TEST1.BBS,TEST1.SCR          This is a comment.

          above: The file(s) TEST1.BBS and TEST1.SCR will copied to the files
          specified in the .CFG file on 29 September "IF" it is a Tuesday 
          (day 3).

     09292,TEST1.BBS,                   This is a comment.

          above: The file TEST1.BBS will be copied to files specified in the
          .CFG file on 29 September "IF" it is a Monday (day 2). The .SCR file
          will be skipped.






     ===========================================================================
                                         1/6
     ===========================================================================








     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================

     12017,,TEST1.SCR                   This is a comment.

          above: The file TEST1.SCR will be copied to files specified in the
          .CFG file on 1 December "IF" it is a Saturday (day 7). The .BBS file
          will be skipped.

          below: The following examples will produce errors:

     017,TEST1.BBS,TEST1.SCR      This will be ignored
     12017TEST1.BBS,TEST1.SCR     Program will HALT with an error
     12017,TEST1.SCR,TEST1.BBS    NON-ANSI callers will get it anyway.
     12017,,                      Nothing will be copied. No error.
     HOLY COW                     Nothing will be copied. No error.

          Most of what was covered in the Variable Holiday list applies to the
          Fixed Holiday list. The fixed holiday list has only FOUR numbers,
          representing MMDD, ie.:

     0101,1993.BBS,1993.SCR                'For New Years DAY only

          This means that 1993.BBS and 1993.SCR will be copied to files
          specified in the .CFG file on 1 January.


     HELLO AND GOODBYE LISTS
     =======================

          The HELLO and GOODBYE lists are functionally identical. HELLO screens
          generally get rotated to screen(s) which the user reads when he/she
          logs into the BBS. GOODBYE screens are shown when the user logs off.
          Both may have comments as shown below.

     GIRLFACE.BBS,                 'Adult Conf advert in WC3 format
      Only the BBS (ASCII) file will be rotated. This line will be purged.
     ,WCLOGO.SCR                   'WC Logo (old)
      Only the SCR (ANSI) file will be rotated. This line will be purged.
     ,,                             No files. No error. Line will be purged.
     ,                              No error. Legal comment not purged.
                                    This line will be purged.
     WELCMBNR.BBS,WELCMBNR.SCR     'And this is o.k.
     WELCOME.SCR,WELCOME.BBS       'Your non-ANSI callers will not be happy.












     ===========================================================================
                                         2/6
     ===========================================================================








     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================

     Purging: HELLO and GOODBYE lists only.
     =======

          If you have any EXTRA lines or lines in the HELLO or GOODBYE list
          which the program does NOT recognize, that line will be removed from
          your list (purged) as detailed above. A line starting with ONE COMMA
          and a COMMENT is NOT purged. Lines such as this will NOT produce a
          screen for that day. Call them "dummy" entries for lack of a better
          word. ie:

     ,                             this is o.k.
      ,                            this will be purged

          This could prove handy if you want a particular screen to remain in
          place for two or more days. Example from a HELLO list:

     ONE.BBS,ONE.SCR        My Favourite screens!!!
     ,                      Hold it for one more day.
     THREE.BBS,THREE.SCR    normal screens (whatever)

          Bearing in mind the TOP file in the list is the NEXT file to be
          rotated, given the above example, the files ONE.xxx will be rotated
          the next time SWAP was run and your HELLO LIST would reflect the
          following:

     ,                      Hold it for one more day. (nothing changes)
     THREE.BBS,THREE.SCR    normal screens (whatever)
     ONE.BBS,ONE.SCR        My Favourite screens!!!


          The next day, when SWAP is again run, your favourite files (ONE.xxx)
          will NOT be replaced as there is a "dummy". Your LIST will then
          reflect that shown below. Note that THREE.xxx WILL be swapped the
          following night.

     THREE.BBS,THREE.SCR    normal screens (whatever)
     ONE.BBS,ONE.SCR        My Favourite screens!!!
     ,                      Hold it for one more day.

          You could put two or more "dummy" entries in your HELLO or GOODBYE
          lists to hold a special file for any two or more days... one for each
          dummy entry.











     ===========================================================================
                                         3/6
     ===========================================================================








     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================

     QUESTIONS and ANSWERS
     =====================

     Q.   Can I combine HELLO and GOODBYE lists?

     A:   Yes. Just specify the same .LST file in the .CFG file. However, you
          would not have much control over which file went where, when. (get
          that?)


     Q.   Can I combine FIXED HOLIDAY and VARIABLE DATE holiday lists?

     A:   NO!. The algorithm for the fixed holiday is such that it looks at the
          first four numbers and then gets the filenames separated by commas.
          You can imagine what your users would say if a screen were produced
          for a non-holiday.


     Q.   Can I combine a HELLO or GOODBYE list with a FIXED HOLIDAY or VARIABLE
          DATE HOLIDAY list?

     A:   NO!. Again, the algorithms for each section is slightly different. I
          apply the KISS technique [Keep It Simple Stupid!].


     Q.   Using an environment specified log, can I log to, say, an ACTIVITY.002
          log while someone is online on that node?

     A:   It should be o.k. File locking is used, but I am not sure what WC
          would do if it tried to write to the log at the EXACT same time as
          SWAP is logging to it. SWAP is meant to be run during an event. If
          node 1 is running the event, then you should log to ACTIVITY.001 to
          avoid potential problems. Same goes for postcall. If you use SWAP in a
          POSTCALL.BAT, you should log to the activity log for that node, or
          don't log after POSTCALL at all. An alternative is to log to your
          LOCAL node log. That is what I do and it works well. Or log to ANY
          file for that matter. For example, you might log to a file in file
          area which only you can access. Then, all you have to do is read the
          file while online. Use your imagination (and your head).














     ===========================================================================
                                         4/6
     ===========================================================================








     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================

     Q.   How can I swap several HELLO screens. 
          For example, I want a HELLO1, HELLO2, HELLO3, HELLO4 and HELLO5.

     A.   I personally would not recommend so many screens. It bores the users
          when they have to wade through all that material to get to the BBS.
          However, since you asked....
          1.   Create a SWAP.CFG for HELLO1 and GOODBYE.BBS and your holidays
               (as per normal).
          2.   Create a 2nd .CFG (ie. SWAP2.CFG for HELLO2 and HELLO3), with the
               HELLO3 replacing GOODBYE input/output paths and filenames and the
               GOODBYE list cited as the HELLO list. Don't use holidays.
          3.   Create a 3rd .CFG (ie. SWAP3.CFG for HELLO4 and HELLO5), with the
               HELLO5 replacing the GOODBYE input/output paths and filenames and
               the GOODBYE list cited as the HELLO list. Don't use holidays.
          Your EVENT batch file should show something similar to:
     @ECHO OFF
     REM DO SOME WORK AND THEN DO THE SWAP PROGRAM
     SET SWAPLOG=YOURFILE.TXT      'set an environment variable for logging.
     SWAP                          'run the normal swap
     CALL COPYIT.BAT               'switch the files
     SWAP SWAP2.CFG                'produce BAT for only HELLO2/3
     CALL COPYIT.BAT               'switch the files
     SWAP SWAP3.CFG                'produce BAT for only HELLO4/5
     CALL COPYIT.BAT               'switch the files
     SET SWAPLOG=                  'get rid of environment string
     REM DO A MORE WORK
     NODE1                         'run Wildcat (node whatever)

          Let your imagination run wild!


     Q.   I have set an environment log but it doesn't seem to work. What could
          be wrong?

     A:   Chances are that when the BBS shells out to run SWAP, the computer is
     out of environment space.  If you can't "temporarily" remove something
     BEFORE "setting" SWAPLOG=, then use the log in the config file. You may
     also specify a log in your configuration file (line 22).  If so, make sure
     you are not setting it in the environment otherwise the environment log is
     still functional, and the one specified in the config file is redundant.













     ===========================================================================
                                         5/6
     ===========================================================================








     ===========================================================================
                            EXAMPLE FILE for SWAP PROGRAM          12 October 92
     ===========================================================================

     Q.   Can a PATH to the list files be used? I mean, can I have my GOODBYE
          list in one directory and the HELLO list in another?

     A.   Yes. IMHO, this complicates things, but if you want to do it go right
     ahead. For all that matters, you may put paths to all of your LISTS, BATch
     file and LOGFILE, ie.:

     C:\WC30\ROTATE\HELLO1.LST      17-Listing of HELLO screens.
     B:\GOODBYE.LST                 18-Listing of GOODBYE screens.
     C:\WC30\HOLIDAYF.LST           19-Listing of FIXED HOLIDAY screens.
     Z:\HOLIDAYV.LST                20-Listing of VARIABLE HOLIDAY screens.
     D:\THISDIR\COPYIT.BAT          21-BATch file you must execute.
     C:\ARC\ACTIVITY.003            22-LOG file for TERSE logging.


     Q.   Can I send you some money for using this program?

     A:   Yes!  Check the SWAP.DOC file for details.



































     ===========================================================================
                                         6/6
     ===========================================================================




