$D Bold='$I0$H' $D head='$T0$I0$H2' $D Italic='$I' $D Roman='$Times12$I0' $Roman $B0.2" $Bold{Letters: A Vax version for the new laser-controler.}$B^0 $P1This program is intended to layout letters for the laser printers with the new Clan controllers and send them to the laser printer. It sends the files it produces to directory B::LP2: and expects a despooler to collect them and print them. $B0 Separately addressed copies of a letter may be sent to a list of addressees or a letter may be sent to a single addressee with copies to a list of recipients (the Cc: list) which is reported on every letter or to a list (the Bcc: list) which is not so reported or to both. The program also prepares a list of names and addresses suitable for the printing of sticky labels for envelopes. $B1The letterhead will be read from a file prescribed by the user. The crest of Edinburgh University may be included in the heading by calling the macro $B0$$crest(1) $B0which calls the contents of the file office:crest. Other crests may be used by including the file in the heading with the directive $B0$$Z.include mycrest $B0and using it in any appropriate way. $B1It is convenient to put into your login.com file the line:- $B0$$newletts:==r [sm.office]letters $B0 and the call then is $Italic $B1$Bold{$$}$Roman{newletts} $B0Prompts and other output are shown in $Bold{bold} type, the users input is in $Roman{normal type}. The commentary is in $Italic{italic}. The session continues with:- $T*1 $B1$head{Heading-file}$Roman{[sm.head]department} $B0The program extends the name with $Roman{.lay} unless an extension is given. The letter head that is printed will be read from the file named by the user in response to the prompt, in this case $Roman{[smhead]department.lay}. The file must contain all that is to appear in the heading except the date, the sender's telephone extension and Email address and also references for the sender and the recipient. $B0The heading should terminate with $Roman{*} on a line by itself and there should be no blank lines within or after the heading, layout commands being used as appropriate. $B0The files $Roman{[sm.head]department.lay} and $Roman{b::office:department} contain the same heading and may be used as models for creating suitable headings for other cases. $B0,3The telephone number can be given in the form $B0$Roman{Telephone: 031 667 1081 Ext. 2750} $B0or anything that contains the word Telephone. Including the string Ext will inhibit the request to the console for the extension. If the string Telephone does not appear in the heading no request will be made in connection with telephone numbers. $B1,5$head{Email Address: }$Roman{S.Michaelson@uk.ac.edinburgh} $B0The Electronic Mail address is probably now as useful as the Telex address. Replying with $Roman{*} will inhibit printing of this item. $B0The sender's name and description can follow the $Roman{*} which terminates the heading and this will inhibit the corresponding requests at the console. $B1,8$head{Sent by: }$Roman{S.Michaelson} $B0$head{Sent by: }$Roman{*} $B0If they are not included in the heading-file, the program prompts for the name and description of the sender, to be printed after the space for the signature. Like the heading, a multi-line item, this ends with $Roman{*} on a line by itself and there must be no blank lines in the item. $B1,13$head{Extension: }$Roman{2750} $B0The program then prompts for the sender's extension since the word 'Telephone' appears in this particular heading and there is no mention of 'Ext' in the same line. $B0 If either 'Telephone' did not appear in the heading or 'Ext' appeared on the same line the program would not look for the extension from the console. $B0 The files [sm.head]smdepartment.lay and office:smdepartment contain specimens of this form. $B1,3$head{My reference: }$Roman{sm/kbd} $B0The program prompts for the sender's reference, to be printed at the head of the letter. The response $Roman{*} will inhibit printing of the reference in the letter. $B1,2$head{Addressee: }$Roman{Mrs L.Parker BSc,Dip.Soc.,MSc,} $B0Then it prompts for the name of the addressee. $B1,6$head{Address: }$Roman{Student Counselling and Advisory Service,} $B0$head{Address: }$Roman{Flat 2, 7 Buccleuch Place,} $B0$head{Address: }$Roman{Edinburgh 8.} $B0$head{Address: }$Roman{*} $B0Then for the address. This must start in response to the first prompt and must be terminated with $Roman{*} on a line by itself. It may be omitted by replying with an asterisk $Roman{*} by itself as the first line of the address. $B1,4$head{Dear }$Roman{Mrs Parker,} $B0The program then expects the salutation, to follow $Bold{Dear} in the letter. Replying with $Roman{*} will cause this not to be printed, so that other forms of salutation can be put into the body of the letter. $B1,3$head{Yours: }$Roman{sincerely,} $B0Next the program expects the dedication, to follow $Bold{Yours} in the letter. Again, this item will not be put into the letter if the response to the prompt is $Roman{*} . $B1$head{Addressee: }$Roman{*} $B0The set of addressees must terminate with asterisk $Roman{*} on a line by itself as the response to the prompt $Bold{Addressee}. $B0The complete details of any or several of the addressees may be supplied in a file which is named to the program in the form $Roman{$@file} instead of the name of an addressee. This form may be used at any point in a list or at several places. Each file of addressees must be ended with $Roman{*} on a line by itself, where the next addresee's name would otherwise be. Remember that the details of the last addressee must still end with the dedication, to follow $Bold{Yours } at the end of his letter. The list provided from the console must still end with $Roman{*} even if the only item provided at the console is a filename. The program continues to try to read more addressees until it reads $Roman{*} from the console instead of the name of an addressee. $B0The files $Roman{[sm.office]addressees.imp} and $Roman{b::office:addressees} contain lists of this type which may serve as models. $B1,4$head{Your reference: }$Roman{lp/jh} $B0If there is only one addressee, the program prompts for the addressee's reference to be printed at the head of the letter. This item too will be omitted from the letter if the response to the prompt is $Roman{*}. $B1,5$head{Letter-file: }$Roman{LP97} $B0Next the name of the file to contain the body of the letter is requested. This may be of the form $Roman{file} or $Roman{file/newfile}. In the first case, a new file will be created if $Roman{file} does not exist. In the second case, if $Roman{file} does not exist the prompt is repeated. The extension $Roman{.lay} need not be given explicitly: it will be filled in by default wherever no extension is given. $B1,3$head{Editing U0:[KBD]LP97.LAY;11} $B1$head{This text was already in the file nominated to hold the letter.} $B1,10$head{>>}$Roman{m0g0} $B0$head{:}$Roman{This text will follow the previous text.} $B0$head{:}$Roman{:} $B0$head{|**END**} $B0,3$head{>>}$Roman{$%c} $B1$head{U0:[KBD]LP97.LAY;11 edited to U0:[KBD]LP97.LAY;12} $B0The editor (in this case VECCE) is then called and behaves in its usual way. The editor IE will be called if the variable LETTERS_EDITOR is set to IE in login.com $B1,10$head{Cc: }$Roman{KBD} $B0$head{Cc: }$Roman{*} $B0As only one addressee was named, the program prompts for a list of names (IDs may be given for any of the recipients) of people who are to receive copies. The names must be separated by $Roman{";"} or newlines. The list must be terminated by $Roman{*} on a line by itself. Responding to the first prompt with $Roman{*} will stop copies being produced. Files of names may be provided instead of all or parts of the list. The form to be used is $Roman{$@file}. $B1,10$head{Bcc: }$Roman{DJR} $B0$head{Bcc: }$Roman{*} $B0As only one addressee was named, the program also prompts for a list of names (IDs may be given for any of the recipients) of people who are to receive copies but not be listed on each letter.Again the names must be separated by $Roman{";"} or newlines. The list must be terminated by $Roman{*} on a line by itself. $B0 Responding to the first prompt with $Roman{*} will stop copies being produced. $B0 Files of names may be provided instead of all or parts of the list. The form to be used is $Roman{$@file}. $B1,3$head{Enclosures: }$Roman{1 Encl.} $B0The program then prompts for any mention of enclosures. Responding with $Roman{*} causes the item to be omitted from the letter. $B1,10$head{You may change any item by answering "yes" to the next prompt.} $B0$head{yes/no: }$Roman{no} $B0Next the program asks whether the user desires to change the information that has already been provided. A response of $Roman{yes} leads to prompts for each item that has already been entered. Each prompt consists of the query $Bold{Change item?} and the current value of the item. A response of $Roman{yes} leads to a sequence of prompts for the details of the new value of the item. After opportunities have been given to change every item, the enquiry about changing is made again, and the sequence may be repeated as many times as is desired. A final response of $Roman{no} to the overall enquiry about changing inhibits or terminates the editing phase. $B1,5$head{Send to laser? }$Roman{yes} $B0The file containing the letters and that containing the names and addresses for the labels will be sent to the queue for the laser-printer since the response was $Roman{yes}. If the response had been $Roman{no} the output would have been left in the files in which it had been created. $B1$head{Letters will be created in x0155.lay} $B0$head{Copy created for FILE"} $B0The creation of a file copy can be suppresses by setting the variable LETTERS_FILE_COPY to NO in login.com (for continuing suppression) or by the console command $$assign no letters_file_copy (for the time being). The console command can be cancelled (or the login.com overridden for the time being) by the console command $$assign yes letters_file_copy. $B0$head{Letter created for Mrs L.Parker} $B0$head{Copy created for KBD} $B0$head{Copy created for DJR} $B1,5$head{Names and addresses for labels are in x0156.lay} $B0The list of names and addresses (or IDs and room numbers) for printing labels is put into a file which also has a name of the form $Bold{x????.lay}. This is laid out for printing on sheets of adhesive labels, two labels across the sheet, seven down the sheet. $B1,10$head{Sending [SM.OFFICE]X0155.LAY TO B::LP2:X0155.LAY} $B0$head{Disconnecting....} $B0$head{Sending [SM.OFFICE]X0156.LAY to B::LP2:X0156.LAY} $B0$head{Disconnecting....} $B0The program prepares a file of commands with a name of the form $Bold{x???.com} and obeys it, deleting all three files it has created. $B0The despooler reports on the screen of the APM as it sends files to the laser printer. $B0If the response to the prompt $Bold{Send to laser? } had been $Roman{no} the command file would not have been obeyed and all three files would have remained in the user's directory. They could be used at a later stage by the user. For example, the letters might be edited before being sent to the laser printer. $B1$head{$$} $n$B1The session without the annotation follows. $B1head{Type '?' for help, '.end' to abandon.} $B1$head{Heading-file}$Roman{[sm.head]department} $B1$head{Sent by: }$Roman{S.Michaelson} $B0$head{Sent by: }$Roman{*} $B1$head{Extension: }$Roman{2750} $B1$head{My reference: }$Roman{sm/kbd} $B1$head{Addressee: }$Roman{Mrs L.Parker BSc,Dip.Soc.,MSc,} $B1$head{Address: }$Roman{Student Counselling and Advisory Service,} $B0$head{Address: }$Roman{Flat 2, 7 Buccleuch Place,} $B0$head{Address: }$Roman{Edinburgh 8.} $B0$head{Address: }$Roman{*} $B1$head{Dear }$Roman{Mrs Parker,} $B1$head{Yours: }$Roman{sincerely,} $B1$head{Addressee: }$Roman{*} $B1$head{Your reference: }$Roman{lp/jh} $B1$head{Letter-file: }$Roman{LP97} $B1$head{Editing U0:[KBD]LP97.LAY;11} $B1$head{This text was already in the file nominated to hold the letter.} $B10$head{>>}$Roman{m0g0} $B0$head{:}$Roman{This text will follow the previous text.} $B0$head{:}$Roman{:} $B0$head{|**END**} $B0$head{>>}$Roman{$%c} $B1$head{U0:[KBD]LP97.LAY;11 edited to U0:[KBD]LP97.LAY;12} $B1$head{Cc: }$Roman{KBD} $B0$head{Cc: }$Roman{*} $B1$head{Bcc: }$Roman{DJR} $B0$head{Bcc: }$Roman{*} $B1$head{Enclosures: }$Roman{1 Encl.} $B1$head{You may change any item by answering "yes" to the next prompt.} $B0$head{yes/no: }$Roman{no} $B1$head{Send to laser? }$Roman{yes} $B1$head{Letters will be created in x0155.lay} $B0$head{Copy created for FILE"} $B0$head{Letter created for Mrs L.Parker} $B0$head{Copy created for KBD} $B0$head{Copy created for DJR} $B1$head{Names and addresses for labels are in x0156.lay} $B1$head{Sending [SM.OFFICE]X0155.LAY TO B::LP2:X0155.LAY} $B0$head{Disconnecting....} $B0$head{Sending [SM.OFFICE]X0156.LAY to B::LP2:X0156.LAY} $B0$head{Disconnecting....} $B1$head{$$}