Powerful, versatile, easy-to-use mailing lists
By Philip Bate, Ph. D.
This fast, complete mailing list program in BASIC works on all Atari 8-bit computers of any memory size. It requires a disk drive.
Mailing list programs for the 8-bit Atari are nothing new, even if one hasn't appeared in Antic for some time. However, Mighty Mailer is an unusually powerful, versatile and easy-to-use mailing application that will do more for you than many others. Wouldn't you like to have a mailing list program that can do all the following?
1. Finds any name/address entry from any part of the name/address-- such as first name, last name, number or street, city, state, or even ZIP code.
2. Prints on labels, envelopes or letters.
3. Scrolls through the mail list and can print all selected entries.
4. Allows easy additions or deletions to the list.
5. Automatically loads a personal address file when booted.
6. Saves the updated list with one keystroke.
7. Makes it easy to build a bulk mailing list of any kind or length without need for alphabetizing.
8. Works extremery fast as well as being simple to use.
Sound too good to be true? Well, it is true--and Mighty Mailer has even more features: It's error-trapped, so keystroke mistakes won't halt the program. It's operated almost entirely with single-key menu selections. It even automatically chooses typewriter mode or typing in capitals, when needed.
Type in Listing 1, MAILLIST.BAS, check it with TYPO II and SAVE a copy before you RUN it. If you have trouble typing the special characters in lines 80-83, don't type them in. Listing 2 will create these hard-to-type lines for you. Type in Listing 2, check it with TYPO II and SAVE a copy before you RUN it. When RUN, Listing 2 creates a disk file called LINES.LST. To merge the two programs, type NEW, then LOAD MAILLIST.BAS and ENTER LINES.LST. Be sure to SAVE a copy of the completed program before you RUN it.
USING MIGHTY MAILER
The Main Menu offers seven choices --Find & Print, Scroll Or Print, Print Labels, Screen List, Change Menu, Dir & Load, and Make New List. Each is selected by a single keystroke.
Find & Print--Useful for people who write a lot of letters. Your personal address list is automatically loaded upon booting. Now you select this option, type in part of the addressee's name and load the envelope or letter into the printer. Just one more keystroke prints the name and address simply and quickly.
Scroll or Print--Allows for scrolling without printing, or printing on either an envelope or letter. This starts with the first name/address on list and goes to the last. Selective printing of any entry on the list is allowed.
Print Labels--Prints the entire list without pausing. Lines 440 and 450 are used for a message, but they can also be used to enter printer spacing information for the labels.
Screen--Quickly displays the entire list onscreen---useful for checking which list it is or searching a particular name.
Change Menu--Add or Delete a name/address entry. Both selections remind you which mailing list is loaded, and both return to the Change Menu instead of the Main Menu. The third Change Menu selection is Save. For added safety, the current filename is displayed and you save changes to this filename with just one keystroke. The last selection returns you to the Main Menu without saving.
Dir & Load--Displays the disk directory and asks for a filename, which it then Ioads, replacing the automatically Ioaded list (D:ADDLIST). Note: this program was written primarilt for single disk drives, so multiple disk drive users will have to modify it for additional device names.
Make New List---Starts a new "DEVICE: FILENAME" and then uses the Add-Name option of the Change Menu. This means that you return to the Change Menu after completing a new list, so it's easy to Save.
Important: It's easier to make the original mailing lists on your word processor. Simply type one [RETURN] after each line in an address, and two [RETURN]s after each complete address.
HOW IT WORKS
Because the Atari allows huge strings, each mailing list is contained in one single string. A versatile machine language routine (located in RAND$) is then used to locate individual entries within that string. The item RAND$ searches for is stored in SUB$. After the particular location of the SUB$ is found by the RAND routine, the end of the entry is indicated by two consecutive [RETURN]s. The next step is backing up to find the start of the entry--again by locating the double [RETURNS]s just before the entry. Name and address lines are separated by single [RETURN]s for each line to make them print correctly.
Here's a sample entry:
1000 Main Street
Anywhere, FL 33497
That's the entry you'll see printed on the screen, if you enter "Joe Z" unless there happens to he another Joe Z on the mega-string before this one. If so, just press the [SPACEBAR] to scroll all the "Joe Z," names until you find the right one. You could also just enter "Zx" or "xcu" or even just "Z" and do the same thing.
This ability to find a complete name/address entry from any part of that entry gives you great flexibility. Suppose you want to send letters to everyone on your list in Anywhere, Florida. Just enter that as the SUB$ and you can address all the envelopes with little fuss. The same goes for the ZIP code--or even just part of the ZIP code.
The two printing modes are identical except that A-mode (Addressee of a letter) prints at coluurnn 10 and E-mode (Envelope) prints at column 40. With a little manipulation a double-column address list is simple. Go to Scroll & Print from the menu, and press [A], printing the first name/address at column 10. Then manually roll the paper back to the first line and press [E], which prints at column 40. Continue this down the page, and you have a double-column address list.
With a few changes in these routines you could even print in three columns instead of two, making up Master Address Lists on 33-label paper forms.
Changing a mailing list is also simple. Adding a name just increases the length of the string, as it's tacked onto the end. Deleting a name is just as simple--the gap left in the string is filled in.
I can write a letter and address it very quickly when using this program with a word processor. I know that the names are on my personal ADDLIST, so I simply enter a two- or three-letter combination and the desired entry pops up and prints with one additional keystroke.
Line 470, which prints the complete list, and lines 1240 and 1250, which contain print instructions, may require modification to accommodate different printers-- see your printer manual. This will work on most Epson and compatible printers. In lines 1240 and 1250 note that the character within the double- quotes is a small "L," not a "1". You may wish to modify these lines to include near letter quality printing, etc.
Lines 620-700 add a name/address to the end of the mega-string. Mailing lists are usually alphabetized, so you can find a name quickly. But since the RAND function accomplishes this so fast, you don't really need to alphabetize your list. In effect, you get a random access search.
Lines 720-820 contain the delete function. In lines 790-810, deleted entries are removed from the mega-string and the gap is closed. Thus deletions and additions cause no waste.
The Save routine uses line 860 to display the current filename. You can also save your data under different filenames.
The RAND subroutine is the heart of the program. First, lines 1070-1090 find the SUB$ portion of the entry in the mega-string. Next, lines 1110-1140 locate the end of the entry which is marked by two [RETURN]s. Then the SEARCH subroutine (lines 1160-1200) finds the start of the entry in the same way. By starting the next search from the beginning of this entry the next "same name" (SUB$) is located. This is the key to sorting by name, address, city or ZIP codes.
Type in Listing 1, MAILLIST.BAS, check it with TYPO II and SAVE a copy before you RUN it. When RUN the program defaults to the Main Menu and will not be able to load in a personal list. Make up your personal address list and SAVE it as "D:ADDLIST" on the same disk as the MAIL LIST program. From now on, it will automatically load upon booting.
Philip Bate is an orthomolecular psychologist from Stuart Florida. Before receiving his Ph. D., he was an electronics engineer at Cape Kennedy. He has been programming on his Atari for about a year.