Program:  FWDSTAT
Author:   Jerry, KI5HH @ KI5HH.#NCOK.OK.USA.NOAM
Email:    JERRY.R.LEBARON@conoco.dupont.com
Purpose:  MSYS Forwarding Analysis
Version:  1.1
Date:     March 1996


DESCRIPTION

FWDSTAT looks at your current MSYS files and attempts to determine how
many active messages you have forwarded to each of your forwarding
partners and how many are still waiting to be forwarded.  Along with
message counts, it also reports the number of bytes.


SAMPLE OUTPUT

------------- MSYS Mail Forwarding Statistics --------------
                    FWDSTAT 1.1 by KI5HH

         ----------- Delivered -----------  ---- Undelivered
BBS Call       B$       B#      PF      PY        B$      PN

K2GKK           2      354       0       0        15       0
             3512   935208       0       0     25548       0

KB5TBQ          0      350       0       0        17       0
                0   908196       0       0     29060       0

WF0A           17      354       3       0         0       0
            29060   922598    2498       0         0       0

N0YYM           3       74       2       8        14       0
             9573   180955     865    5890     19487       0

Active messages = 440

----------------- MSYS Mail Analysis End -------------------


FWDSTAT USAGE

Put the FWDSTAT.EXE file in your MSYS subdirectory!  It will save you
trouble later.

You may invoke the FWDSTAT program while MSYS is down by typing:

FWDSTAT

There are no operands.   Your MSYS subdirectory must be your default
directory.  The report will be displayed on your monitor.

You may also invoke FWDSTAT from the command window when MSYS is up by
typing:

RUN FWDSTAT

MSYS will then direct output to file $POOL in your MSYS subdirectory. 
It's up to you do view the $POOL file after FWDSTAT is finished.  I have
noticed that once in a while the results are no good when FWDSTAT is
running while MSYS is up.  I think this is because MSYS is updating the
message header file while FWDSTAT is trying to process it.  And if that
happens, FWDSTAT can get lost.

HOW FWDSTAT WORKS

The FWDSTAT program scans the following MSYS files:

MSYSBBSB.DAT     MSYS.FWD     MSYS.MSG

It assumes that these files all reside in the current default directory. 
I normally just keep the FWDSTAT.EXE file in my MSYS subdirectory.  The
MSYSBBSB.DAT and MSYS.FWD files are loaded into memory and used from there
to promote quicker running of the program.  MSYS.MSG is processed one
message header at a time.

Each active message header in MSYS.MSG is checked against the MSYS.FWD
information in memory.  Every message category in MSYS.FWD is compared
against the first field in the message header's hierarchical address. 
When a match is found, FWDSTAT looks up that BBS callsign in the
MSYSBBSB.DAT array in memory and adds one message (and its corresponding
size) to the appropriate counters for that BBS callsign.  The flag bit
assigned to that BBS callsign in MSYSBBSB.DAT is compared with the flags
field in the message header to determine whether or not this particular
message already exists at the BBS we are working with.  If the message is
a personal message, then processing continues by skipping to the next
message header.  But if this is a bulletin, then FWDSTAT continues looking
for other BBS callsigns to which the message flood designator is to be
forwarded and then it repeats the above process.

If there are no matches using the first field in the hierarchical address,
the above process repeats using the second field.  Example:

SP KB0FHS @ WF0A.#SCKS.KS.USA.NOAM

Since this is a personal message, FWDSTAT will look for KB0FHS in
MSYS.FWD.  Once found, it adds this message to the counters for the
correct BBS then goes to the next message header.  If there is no match on
KB0FHS, then the process is repeated using WF0A, then #SCKS, then KS, etc. 
But a bulletin is handled as follows:

SB SALE @ ALLUS

The scan in MSYS.FWD begins with a search for ALLUS since the current
implementation of MSYS doesn't really support bulletin forwarding by
category very well yet.

If no match is found for any field in the hierarchical address, processing
continues with the next message header.

The current implementation of FWDSTAT supports only the (* asterisk)
wildcard character in MSYS.FWD.  Future releases should support all the
wildcards which MSYS supports.

SSIDs are ignored when comparing the BBS callsigns in MSYS.FWD with those
in MSYSBBSB.DAT.  If other non-alphanumeric characters are present in the
callsigns, then those callsigns are ignored entirely.

No support yet exists in FWDSTAT for TCP/IP forwarding partners.


DISCLAIMER

FWDSTAT is an MSYS utility program developed by KI5HH (Jerry LeBaron).  It
is protected under copyright law as an unpublished work.  FWDSTAT is
hereby placed into the public domain without warrantee of any kind.  The
author will not be held responsible for any damages whatsoever resulting
from use of this program.