!<Letters      2100  16/6/87.
    It is often necessary to prepare many copies of the same letter which
    differ in the names and addressees to which they are to be sent, or to
    be sent as copies, or to be sent as blind copies. On different occasions,
    letters may have to be prepared with different headings. They also have
    to be annotated as from different senders.
    This program is used to prepare letters in Layout 2.0. It sends the files
    it produces to directory B::LP2: or B::LP3: and expects a despooler to 
    collect them and print them on a laser printer with a Clan controller.
    To produce a letter on paper with the Departmental heading one must at
    least nominate a recipient, write the body of the letter and allow the
    program to fill in the rest. Since the letter will incorporate items
    particular to the sender, these must be provided by some other method.
    This program looks for information in command variables before it asks
    for information from the console.
    By putting enough information into command variables for repeated use
    one can reduce the preparation of a letter to its simplest form.
!<Abandon
    If this item is selected the program is abandoned without the creation
    of any output files.
!>  End of Abandon.
!<Command Variables
    These may have values assigned to them by commands of the form
    assign "value" variable.
    If this is done at the console, the value overrides any values that have
    previously been assigned.
    It may be done in a command file, in which case the form is
    $assign "value" variable.
    The command variables that are read by the program are:-
        letters_address
        letters_addressees
        letters_bcc
        letters_cc
        letters_create_labels
        letters_directory
        letters_default_dear
        letters_default_yours
        letters_editor
        letters_email
        letters_enclosure
        letters_extension
!PAGE
        letters_fax
        letters_file_copy
        letters_heading
        letters_letter_file
        letters_my_reference
        letters_name
        letters_printer
        letters_print_letters
        letters_print_labels
        letters_sent_by
        letters_telephone_number
        letters_telex
        letters_your_reference
!>  End of Command Variable.
!<Create output
    If you select this item at the top of the menu and enough items have been
    given values, the program will proceed to create the letters in a file. It
    will also create labels in another file if the item Create Labels has been
    set to Yes. These files will be sent to the printer and deleted if the
    associated control items, Print Letters and Print Labels, have been set to
    Yes, otherwise the files will be left in the current directory.
!>  End of Create Output.
!<Cursor
    This is used to select items from the menu so that their values can
    be changed.
    The cursor may be moved up or down by using the cursor control keys. It
    will not move beyond the ends of the menu. If it reaches the top or the
    bottom of the screen without reaching the end of the menu, the screen will
    be filled from the top or bottom of the menu, respectively.
    When the cursor is at an item, typing <RETURN> selects that item for
    alteration.
!>  End of Cursor.
!<Menu
    At any moment this shows part of the list of items that can be set to
    affect the printed letter. It also shows the current value of each item,
    or at least the first line of the value. The rest of the menu may be shown
    by moving the cursor off the screen, up for items near the top of the
    menu, down for those near the end.
    An item may be selected by pressing <RETURN> when the cursor is at
    the item.
    Typing ? and <RETURN> before or after the item has been selected will yield
    information about the particular item.
!>  End of Menu.
!<Items that can be changed
    There are several items of information which affect the appearance of the
    letters. An item may be selected by movingthe cursor to it and typing
    <RETURN>. For most items a value may then be entered by typing it and
    pressing <RETURN>.
    When Cc: or Bcc: lists are selected, a list of the current recipients is
    created and the editor is entered to permit the user to alter the list.
    For the body of the letter, the user is expected to provide the name of
    the file containing it. When <RETURN> is pressed, the editor is entered so
    that the letter can be changed.
    When the editor is left, the menu is re-written.
!<Address
    If there is one or no addressee, this item may be used to alter or set
    the one address. If there is more than one, selection of this item will
    result in the item Addressees being selected.
    An address consists of one or more lines, terminated by a line containing
    nothing but an asterisk.
    The lines may end with commas or full stops, but need not. The appropriate
    punctuation will be put inplace when the address is printed.
!>  End of Address.
!<Addressees
    This item refers to the primary recipients of the letters. If it is
    selected from the menu, a file is created containing the current addressees.
    The editor is then entered to enable the user to alter the list.
    For each addressee the list must contain the name, the addrress, the
    salutaion to be used after Dear and the dedication to follow Yours at
    the end of the letter. The items must appear in that order. Blank lines
    before each item will be ignored.
    The address must end with * (on a line by itself) after its last line.
    The list must end with * instead of the next name.
    Files containing lists of this form may be included in the list by
    giving a line of the form  @File  instead of a whole entry.
!PAGE
    e.g.
        Dr A.S.Wight,
        19 St Ninian's Terrace,
        Edinburgh EH10 5NL,
        Scotland.
        *
        Alec,
        sincerely,
        
        @professors
        
        *
        
!>  End of Addrressees.
!<Bcc
    This must be a list of the recipients who are to have copies of the letter
    but who are not to be reported on any letter other than their own and the
    file copy.
    When this item is selected, a file containing the current list (possibly
    empty) is created and the editor is called. When the editor is left, the
    file is read and the new list is stored for use when the letters are
    created.
    The recipients are identified by name or by user ID (e.g. Vax username).
    The identifiers must be separated by semi-colons if they are on the
    same line, or be on separate lines.
    The list must be terminated by * on a line by itself.
    Files containing the identifiers of recipients may be included in the
    list in the form @file. Each file must end with * on a line by itself.
!>  End of Bcc.
!<Cc
    This must be a list of the recipients who are to have copies of the letter
    and who are to be reported on all letters.
    When this item is selected, a file containing the current list (possibly
    empty) is created and the editor is called. When the editor is left, the
    file is read and the new list is stored for use when the letters are
    created.
    The recipients are identified by name or by user ID (e.g. Vax username).
    The recipients are identified by name or by user ID (e.g. Vax username).
    The identifiers must be separated by semi-colons if they are on the
    same line, or be on separate lines.
    The list must be terminated by * on a line by itself.
    Files containing the identifiers of recipients may be included in the
    list in the form @file. Each file must end with * on a line by itself.
!>  End of Cc.
!<Create Labels
    This item may be set to Yes as a result of Print Labels having been set
    to Yes.
    If it is set to No, then Print Labels will be set to No.
    If it is set to Yes, the file of labels is sent to the printer and destroyed.
    The command variable is letters_create_labels.
!>  End of Create Labels.
!<Default Dear
    The value of this item is used if the item supplied in the details of the
    addressee is  *.
    The command variable is letters_default_dear.
!>  End of Default Dear.
!<Default Yours
    This value is used if * is supplied in place of the dedication when the
    details of an addressee are supplied.
    The command variable is letters_default_yours.
!>  End of Default Yours.
!<Directory
    This item must be set to the directory that is to be used by default if
    the name of any file does not contain a directory.
    The command variable is letters_directory.
!>  End of Directory.
!<Editor
    The item editor must be set to  ie  or vecce.
    The command variable is letters_editor.
!>  End of Editor.
!<Email
    This item will be printed at the end of the heading if it is neither null
    nor *.
    The command variable is letters_email.
!>  End of Email.
!<Enclosure
    This item will not be printed if its value is *.
    It may consist of any line of text which will be printed after the signature
    with the prefix Encl:- 
    The command variable is letters_enclosure.
!>  End of Enclosure.
!<Extension
    An extension which is neither null nor * will be printed if the tlephone
    number is printed.
    The command variable is letters_extension.
!>  End of Extension.
!<Fax
    This item should be set to the Fax address of the sender.
    The command variable is letters_fax.
!>  End of Fax.
!<File Copy
    If this is set to Yes a copy of the letter will be made for the files. It
    will bear a note of everyone for whom a copy of the letter has been made.
    The command variable is letters_file_copy.
!>  End of File Copy.
!<Heading
    This item should be set to the name of a file containing the heading for
    the batch of letters. 
    The command variable is letters_heading.
!>  End of Heading.
!<Letter file
    This requires a parameter string of the form appropriate to the editor
    in use. It may contain both input and output file-names.
    When <RETURN> is pressed to enter the parameter string, the editor is called
    and the body of the letter may be created or modified. The edited version
    will provide the body of the letters that are sent.
!>  End of Letter-file.
!<My Reference
    This item will be printed before the name and address of the recipient if
    it is neither null nor *.
    The command variable is Letters_my_reference.
!>  End of My Reference.
!<Name
    This item may be used to set the name of a single addressee.
!>  End of Name.
!<Printer
    This item must be set to lp2 or lp3, these being the only printers which
    handle Layout 2.0.
    The command variable is letters_printer.
!>  End of Printer.
!<Print Labels
    If this item is set to Yes, the item Create Labels will also be set to Yes.
    If that item is set to No, this item will be set to No.
    If this item is set to Yes, a file will be created containing the name and
    address of every recipient, scaled to fit into a label, and that file will
    sent to the printer and deleted.
    If this item is set to No, a file may be created (see Create Labels) but it
    will not be sent to the printer and will remain in the user's directory.
    The command variable is letters_print_labels.
!> End of Print Labels.
!<Print Letters
    If this variable is set to Yes, the file of letters is sent to the printer
    and deleted.
    If it is set to No, the file of letters is not sent to the printer and 
    remains in the user's directory.
    The command variable is letters_print_letters.
!>  End of Print Letters.
!<Sent By
    This item may occupy several lines. It will be printed in the middle
    of the foot of the letter, after space for the signature.
    It may be set from command variables. They must be named
    letters_sent_by1, letters_sent_by2, . . . 
    The value "*" must be assigned to the next variable after the end of
    the description.
    e.g.
        $assign "S.Michaelson," letters_sent_by1
        $assign "Chairman of the School of IT." letters_setnt_by2
        $assign "*" letters_sent_by_3.
!>  End of Sent By.
!<Telephone Number
    If this item is set to *, the telephone number will be omitted from the
    heading.
    The command variable is letters_telephone_number.
!>  End of Telephone Number.
!<Telex
    This item should be set to the Telex number to which messages may be sent
    for the sender of the letters. The telex number will be printed at the end
    of the heading.
    If the item is set to *  the telex number will be omitted from the heading.
    The command variable is letters_telex.
!>  End of Telex.
!<Your Reference
    This will be printed at the head of the letter if it is neither null nor *.
    The command variable is letters_your_reference.
!>  End of Your Reference.
!>  End of Items that can be changed.
!>  End of Letters.
