Mailing List System The following programs make up the Mailing List System 1. Labin - Add or make changes to the list of names and addresses. 2. Labout - Print out the name and address either in a format that fits the standard label or what is called a "Straight Image" which is name, address and all stored information about each person on 2 lines. 3. Sortl - Sort the names either alphabetically or by zip code. 4. Alpha - A command file to dump an unsorted file and replace it with the newly sorted file. Entering Names and Addresses Use the Labin program. This program must be run from a VT-100 or "VT-100 Compatible" terminal. The program presents you with a template in which you fill in name, address, zip code and answer certain questions which you can use or not at your option. When entering the person's name, enter the last name first, followed by first and middle if desired. Do not put a comma between the last name and the first name. If the person has a title which you want to appear on the label, place a comma between the name and title. Place an exclamation mark at each point where you want a carriage return to appear in the address. So, for example, the following name and address might be recorded. Smith John P., President!U. S. Rock Grinding Co.!434 Dust St.!Berea, KY The zip code goes in its own special place on the template. The maximum number of characters in the name and address is 70 characters. You may use the arrows,space key, or delete key as much as needed to correct any mistakes and get the information squeezed into the 70 characters allowed. When you hit the maximum number, the computer will stop echoing back letters as you enter them. If you have more to enter, go back into the name and start making abbreviations until you get the complete name and address entered. Two questions ask for the person's profession and for his organization. In each case, use an integer corresponding to your code for organization or profession. An example of such code is enclosed (See Code.txt). For the question, company, answer Y if the name is a company and N if it is not. If you answer N, the computer will take the first name in the line and assume it is the person's last name so that the labels will be printed with the person's first name, first. The questions about which mailing list a person is on should be answered with either Y or N. You may change the number of mailing lists asked about each time by using one of the options that first appear when you run labin. The actual names of the mailing lists have to be changed by editing the program TITLE.MAC. For specific directions about changing the names, follow the documentation in the program. When you have entered all the information about a given person and are sure everything is right, tell the computer you are through with this person by entering Cnt Q or Cnt X. Hitting Cnt Q will cause the current date to be entered as the last day contacted. Control X leaves the date of last contact unchanged. If you ask to change a given name and the computer fails to find the name, it could be for two reasons. It could be that you misspelled it or it could be the person's name has been added to the list after the last time it was sorted and so, is not in its proper place alphabetically. If this is the case, tell the computer the person's name is "Last" and it will go to the end of the list and give you the last 16 names. If the name you want is one of these 16, use the up or down arrow to get to that name and then hit the A key to accept the name. If it is not one of these 16 names, hitting the B key causes it to backup and display the previous 16 names in the list. F causes it to go forward 16 names. If you try and go past the end of the list, you will get no error message but the screen will go blank. Hit the B key to get back on the list. If the name you want is on the sorted portion but fails to find the name, the computer will display the 8 names above and 8 below this point alphabetically. If it finds the name you want but there are more names in the list that match with what you gave, it will start at the point where it first found a match and allow you to go forward or backward in batches of 16 names. When the name you want is displayed among the 16 names, use the up or down arrow and hit A to accept it. For example, if you ask for the person, Jones, and you have 50 people with the name of Jones, you will have to step through the list until you find the person desired. Along with the name, the first part of the address is shown so hopefully there is enough displayed to allow you to recognize the person. Of course if you know the person's name is Robert F Jones and you have only one Robert F Jones on the list, you won't have to go through this stepping procedure. (Just be sure to enter the name as Jones Robert F) If you are changing a name and address, the information previously entered is placed in the template and you use the arrow keys, back space, delete key, or carriage return to bring the cursor to the point where change needs to be made. Make the change and exit using either Cnt X or Cnt Q. At this point, the computer expects you to enter another name. If you have none to enter, hit the carriage return with no name shown. The computer will exit from the program. You will notice that if the computer fails to find an exact match, it will give you the option to hit R to tell it you are rejecting all names and giving up. When you do so, it then gives you the option of searching all names sequentially. If you choose to do that, it will search all names irregardless of whether it is in the sorted portion or unsorted. Also, the name you give it does not have to be the last name. All it has to be is a portion of the name and address that you entered. For example if you are looking for a certain person and can't find him when you entered the person's name, try it by entering the town that he is from. For example, if he was from Knoxville, enter Knoxville as if it was the person's name. It will probably tell you it found no one with that name, displaying the eight names either side of that point alphabetically. Hit R to reject these possibilities. It will then ask you if you want to search sequentially. Enter a one to tell it you do. It will then start the beginning of the list and when it comes to the first name and address where it sees the word Knoxville, it will ask you if this is the right one. Hit one if it is, just carriage return if it isn't. In this way, you should find the name desired. Of course, if there are a hundred people in your list from Knoxville, you may have to look at a hundred names but it does provide a way to find someone for which there may be no other way. To delete a name from the list, call up the name just like you would do if you were going to make a change. Place the number 9 as the first character of the name. From this time on, the computer will think that the name has been deleted and the next time you sort the names, will physically delete it. Printing Names and Addresses Run the labout program to print the names and addresses. Insert the kind of paper having the stick on labels in the printer. When you have lined up the paper and set the margin to what you think it should be, print a half dozen labels or so to test it out. One way to do this is to use the option to print one label several times. Once you have tested it with a few labels, print the entire list. Answer the questions that the program asks. This will allow you to print whatever names have the characteristics you want. The option about "Straight Image" print out is designed to give you all the information there is about the people in the list. Keep this list in case you have a horrible catastrophe and the list in the computer gets wiped out. Sorting Names When names are added to the list, they are added to the end of the list and not inserted in the proper alphabetical location. So every once and a while, the list must be sorted. Before sorting the names be absolutely sure you have made a back up file on a different disk or different account. Once you are sure this has been done sort the names by running the program Sortl. It will ask if you are sorting the names alphabetically by last name or by zip code. In either case, a new file is created called SORTL.DAT If you are sorting the names alphabetically, the old file, LABEL.DAT, must be deleted and replaced with the new file just created. Before you do this, list the file using PIP and if the number of blocks looks O K and there were no error messages of consequences when running sortl, give the command: @ALPHA This will delete the old data file and replace with the new one. If you were sorting the list based on zip code, do not delete the old file (the one called Label.dat). The labout program looks for this SORTL.DAT file when you tell it you are printing the labels in order by zip code. After you have printed the labels, you can usually delete the file SORTL.DAT. It takes up a lot of space on the disk and if you add or make any changes in the names between this printing and the next printing you have to rerun Sortl. So there is no reason to keep the Sortl.dat file. Sorting the list from an alphabetized order to an order based on zip code takes approximately 14 minutes per 1000 names. (Using a PDP 11-34 with RK05 disk drives.) The program works by scanning through the list on file picking out the first 1000 names. These are sorted and written out to the new file after which it proceeds to the next 1000 names and so on. Using this procedure, it should be possible to sort any number of names. So far, the maximum number of names that we have sorted is about 4000. Removing Old Names from the List When you run the program Labin, there is an option to delete old names. Choose this option. You will then be asked the date for which all names previous to this date will be deleted. Enter the date as month, day, year with any space, comma, or any alphabetical character separating the parts of the date. For example, enter May 15, 1984 as 5 15 84. Once you have done this, the program will go through and mark any name with a date previous to that for deletion but will not actually delete it. This will happen the next time you run the sorting program. Even though the names are still physically present they will not show up in any procedure you might do. If you inadvertently choose the option to purge old names when you don't want to, hit the carriage return with no date entered when it asks for the date. The program will exit and not purge any names. Notes So far, the system does not allow the new 9 digit zip codes nor the Canadian 6 digit zip code. For the time being, we are getting by, by placing the Canadian zip code as part of the address and leaving the space where it was supposed to go blank. As a consequence, when sorting by zip code, the Canadian names come out at the beginning in no particular order. Following this will be the U S names which will be in order. Hopefully, by next year, the necessary modifications will be made to allow for 9 digit zip codes. A small list of names has been enclosed to give you a starting point. Please add at least 3 or 4 names of your own before deleting the names currently on the list. We have two printers, one at TT5: and the other at TT13: You will need to change any references to these devices to correspond to the location of your printer or printers. Compiling and Taskbuilding There are no special notes on compiling the programs. There will be an error message for the fortran programs about possible modification of index ... Ignore this message. To taskbuild the programs, each program has a command file so that you an say TKB @NAME to taskbuild each program. One of the options in the command files is a reference to a Fortran Resident Common region. You will probably have to modify or eliminate this option. The data is stored in a file called label.dat. The offsets for each record are described in the file called label.txt.