A DETAILED FUNCTIONAL SPECIFICATION OF THE
MAILING LIST PROGRAM AS OF 12/16/2000
The program named 'mlist' is written in FoxPro for Unix
and runs on an SCO Unix operating system at MMC.
The program source can be found in this directory:
/v/mlist
While the source has not been changed substantially
for several months/years there is no guarantee
that it will stay constant as various needs may arise
until it is redesigned, rewritten and can gladly retire.
The mailing list program keeps track
of names and addresses for those people
interested in the activities at MMC.
PEOPLE
Each person has these attributes:
| FIELD NAME | COMMENT |
| NAME_LAST | Last Name |
| NAME_FIRST | First Name |
| NAME_SANS | Sanskrit Name |
| NAME_PREF | Preferred method of displaying the name |
| ADDR_1 | Address Line 1 |
| ADDR_2 | Address Line 2 |
| CITY | City |
| STATE | State |
| ZIP | Zip |
| TEL_HM | Home Phone |
| TEL_WK | Work Phone |
| FAX | Fax |
| EMAIL | Email Address |
| AFFIL | Affiliations |
| DATE_ENTRD | Date originally entered* |
| DATE_UPDAT | Date last modified* |
| DATE_HF | Date when Hanuman Fellowship membership expires |
| DATE_PATH | Date when Pathways subscription expires |
| DATE_LM | Date of Land Membership |
| COMMENT | Comment containing name of the last program attended* |
This metadata also kept:
| ID | Unique Id* |
| ID_SPS | Id of Spouse (if partnered)* |
| AKEY | Address Key* |
Items above ending with a * are automatically maintained
by the program. The user cannot modify them directly.
There are commands for Adding, Editing, and Deleting these records.
When adding a record, a check is made for a duplicate record
(meaning identical First and Last names).
The user is asked whether they do indeed want to add it.
This is used to minimize duplicates and hence postage costs.
PREFERED NAME DISPLAY
Each person has choice of how they want
their name displayed for
purposes of mailing labels or other lists:
- First Last (default)
- Sanskrit Last
- First Sanskrit Last
- Sanskrit First Last
- Sanskrit
- Last First Sanskrit (without trimming trailing blanks)
This last one is used for long business names that
do not fit into the normal "person name" format.
ADDRESS KEY
The address key is computed from the address and zip
code and is used for helping with unduplication of the
records - important for reducing postage costs.
It is computed like so:
All digits are extracted from the two address fields
and then the zip code and the first alphabetic
letter in the first address field are appended.
341 Main St.
Suite #405
Santa Cruz, CA 95060
This would give an address key of:
34140595060M
AFFILATIONS
Affiliations are single letter codes with associated descriptions.
They are maintained in a separate table.
The 'Affiliation' field in a People record
consists of an unordered sequence of these single letter codes.
Like so:
At53F
The letters could have these descriptive meanings:
| A | Sri Ram |
| t | Phone Tree |
| 5 | Yoga |
| 3 | Art Displays |
| F | Jewish |
In addition to displaying the sequence of single letter
codes, the affiliation descriptions are displayed on the screen
much as it looks above.
Affiliations are used to make lists of selected groups.
There is a command to delete a given affiliation
from all records. More generally, one can change
all occurences of an affiliation to another single
letter code.
STEP THROUGH, SEARCH AND SORT
The People records can be sorted in these manners:
- Name (Last, First)
- Sanskrit
- Zip Code
- Home Phone Number
- Address (sorted on the Address Key)
Records can also be searched for by looking
for a prefix of these fields. For example,
when the records are sorted by Name you can find a person
whose name begins with "STO". All such names
are presented in a list from which you
can choose one of them and be brought to
the full record of that person.
There are commands for going to the Next and Previous
records according to the current sort order.
PARTNERS
There is a command available to link two people together.
The two people can be already present in the list.
After partnering there is a way to jump quickly to
the partner. There is also a way to separate
partners.
You can also add a new person record as the partner of the current
record. When doing this all fields default to those of
the current record except the first name.
Each person in a partnership has their own preferred display
name. When a label is generated for the couple
it is composed of their individual display names separated by an '&'.
SPECIAL LISTS
Several listings are produced of the people in the database.
The listings can be displayed on the screen, sent to a printer
or redirected into a text file.
- Phone List
A list is made of everyone satisfying these criteria:
- a non blank Sanskrit name
- 'f' in the Affiliation field
- either a home or a work phone number
The list is presented in tabular form
in Sanskrit Name order. There are columns for
Name, Home phone, Work phone,
and Address (including City, State, Zip).
At the top of this list appear 3 columns of
the names of the 'residents' of MMC.
They satisfy these criteria:
- a non blank Sanskrit name
- 'f' AND 'r' in their Affiliation field.
- no Home or Work phones
- Zip Check
All records are looked at in Zip Code order.
The City fields are examined to see if there
is more than one city in the same zip code area.
If so, they are all displayed along with the zip code.
This can be used to check for misspellings.
- Unduplication List
All records are examined for possible duplicates
and a list is generated of suspicious candidates.
If two people have the same "Address Key" and they
are not partners and they do not live at 445 Summit Rd
Watsonville, CA 95076 (a key of 44595076S) then
these two _may_ be the same person (or they
could be roommates).
If two people records have the same first _and_
last name this is reported in a separate part of the listing.
- Phone Tree (this may no longer be needed)
A list of everyone with a 't' in their
affiliation, separated into distinct area codes.
Mostly used for local people (408, 831, 415, 510 etc).
- Fellowship
Ask for a date and then give a list of
everyone whose Hanuman Fellowship membership expiration date
is before that date.
Give "Last, First", Sanskrit and HF date in columns.
- A list of affiliations and their descriptions.
- A list of affiliations and how often they are used
within all people's records.
- A list of how many people fall into year 'bands'...
Showing when their last contact with the center was.
This is determined by examining DATE_ENTRD and DATE_UPDAT.
- A way of Purging by giving a cut-off number of years.
If a person has not had contact with the center
for X number of years, they will be deleted. There is
a way to first get a list of such people for perusal
prior to the actual mass deletion. This way you can
go to those people's records and mark them as 'current'.
- A way of automatically sending an email to everyone
with an email address asking them to confirm their
address, phone, etc.
GENERAL LISTINGS
These are maintained in a Report Table.
Reports have these attributes:
- Description
- Zip Ranges
like: 95060-95070, 91023-92034
one line with several ranges in it
- Affiliations
a sequence of single letter codes from the Affiliation table.
a record is chosen for the listing if any of the
affiliations listed here appear in the affiliation record
for the person.
- Order
Zip
Name
or Sanskrit
- Beginning At
- Ending At
These two establish boundaries for the records
depending on the Order column. It makes it unnecessary
to go through the entire People table - hence quicker
generation.
- Format
- 2 up labels
With preferred name, address, city, state, zip.
- Email to Complete Mailing Service
One line with pipe separated fields with
display name, address, city, state, zip
- Name, Address
- Name, Home, Work
- Name, Home, Work double spaced
- Name, Home
- Count
Simply print a count of the total records selected.
- DBF format containing all columns
- 1 up labels
- 4 up labels
- Statistics
Shows total number of records selected plus:
A calculation is made for each
record yielding how many years it has been
since there was any activity on that record.
The dates of last modification, original entry,
hanuman fellowship membership, and land membership
are considered.
A table is printed of how many records are
in categories of 1 through 20 years.
- Just the Preferred Name
- Probability
If this field is not equal to 1 it is used to
make a random selection of records. Essentially
a die is thrown to determine if the record should
be included or not. This can be used, for example,
to select 500 random records in Santa Cruz County
(a certain zip code range).
- Extra Field
This text is placed at the top right of any generated labels.
Can be used for knowing which mailing it was...
Report records can be added, deleted, and edited.
You can search for a report by description.
You can step through Next and Previous report records in description
order.
Reports can be "run". This means that
all records (unless there are beginning and ending fields)
in the database are examined to see if:
- the zip code occurs in the report's zip code ranges
- if any affiliation in the report record occurs in the
affiliation in the person record.
If so, the record is chosen and it is formatted for output.
Two notes:
- If there is an affiliation of 'x' this record
will not be included on any mailings (Formats of 1, 2, or 4-up labels or
sending to Complete Mailing Service).
- If a person has a partner and the partner's record
also matches the criteria then include only
ONE record in the output with both of their names.
The order of the names is chosen randomly
to make the treatment of the sexes more egalitarian.
CUSTOM LISTS
There is one other column in the Report record.
It is called 'custom'. If this integral field is non-zero
then the Zip Range and Affiliation fields are ignored.
This integer (X) is used to create a file name:
customX.prg
This is a snippet of FoxPro code that returns true
or false. As each People record is processed
this bit of code is executed. If it returns true
the record is chosen otherwise not.
Before the report is run a variable 'initialized' is
set to .t. The custom snippet of code can utilize this
to set things up:
if .not. initialized
@10, 10 say "Date?" get end_date
read
initialized = .t.
endif
return hf_date <= end_date
MASS MAILING
There is a command (separate - not within mlist) that can send
a letter to everyone on the list that has an email address.
This is affectionately known as "spamming".
BUGS
Undoubtably.
NEEDED ENHANCEMENTS