$D head='$T0$H2' $B0.2" $H2{Letters: the first APM version for the new laser-controler.}$B^0 $P1This program is intended to layout letters for the laser printers with the new Departmental controllers. $B0 Separately addressed copies of a letter may be sent to a list of recipients or a letter may be sent to a single addressee with copies to a list of recipients (the Cc: list). The program also prepares a list of names and addresses suitable for the printing of sticky labels for envelopes. It sends the files it produces to directory B::LP2: and expects a despooler to collect them and print them. The despooler must be run in the machine which is connected to the new laser-printer, SM's APM. $B1It is neccessary to call @office:setup before calling any of the services in office:, so it is convenient to put the lines:- $B0$$@office:setup $B0$$letters=office:letters $B0$$memo=office:memo $B0into the login.com file of the directory from which you intend to call the services such as memo and letters. $B1The call to run the program is:- $B0$H2{$}}$I1.1{letters} $B0Prompts and other output are shown in $H2{bold} type, the users input is in $I1.1{italic}. The session continues with:- $T*1 $B1$head{Heading-file}$I1.1{office:department} $B0The letter head that is printed will be read from the file named by the user in response to the prompt, in this case $I1.1{office:department}. The file must contain all that is to appear in the heading except the date, the sender's telephone extension (perhaps) and references for the sender and the recipient. The heading should terminate with asterisk $I1.1{(*)} on a line by itself and there should be no blank lines within or after the heading, layout commands being used as appropriate. $B1,8$head{Sent by: }$I1.1{S.Michaelson} $B0$head{Sent by: }$I1.1{*} $B0Then the program prompts for the name and description of the sender, to be printed after the space for the signature. This is a multi-line item, like the heading and must end with asterisk $I1.1{(*)} on a line by itself. It must not contain any blank lines. $B0The sender's name and description can follow the * which terminates the heading in the file and this will inhibit the relevant requests at the console. The file office:smdept contains a specimen of this form. $B1$head{Extension: }$I1.1{2750} $B0The program then prompts for the sender's extension since the word `Telephone' appears in the heading-file and there is no mention of `Ext' in the same line. If either `Telephone' did not appear or `Ext' appeared on the same line the program would not look for the extension from the console. $B1,3$head{My reference: }$I1.1{sm/kbd} $B0The program prompts for the sender's reference to be printed at the head of the letter. The response $I1.1{ * } will inhibit printing of the reference in the letter. $B1$head{Addressee: }$I1.1{Mrs L.Parker BSc,Dip.Soc.,MSc,} $B0Then it prompts for the name of the addressee. $B1,6$head{Address: }$I1.1{Student Counselling and Advisory Service,} $B0$head{Address: }$I1.1{Flat 2, 7 Buccleuch Place,} $B0$head{Address: }$I1.1{Edinburgh 8.} $B0$head{Address: }$I1.1{*} $B0And then for the address. This must start in response to the first prompt and must be terminated with * on a line by itself. It must not have any blank lines within it. $B1,4$head{Dear }$I1.1{Mrs Parker,} $B0The program then expects the salutation, to follow $H2{Dear} in the letter. Replying with $I1.1{ * } 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: }$I1.1{sincerely,} $B0Next the program expects the dedication, to follow $H2{Yours} in the letter. Again, this item will not be put into the letter if the response to the prompt is $I1.1{ * } . $B1$head{Addressee: }$I1.1{*} $B0The set of addressees must terminate with asterisk($I1.1{*}) on a line by itself as the response to the prompt $H2{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 $I1.1{$@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 $I1.1{*}. The list provided from the console must still end with $I1.1{*} even if the only item provided at the console is a filename. The program continues to try to read more addressees until it reads $I1.1{*} from the console instead of an addressee. $B1,4$head{Your reference: }$I1.1{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 $I1.1{ * }. $B1,5$head{Letter-file: }$I1.1{LP97} $B0Next the name of the file to contain the body of the letter is requested. This may be of the form $I1.1{file} or $I1.1{file/newfile}. In the first case, a new file will be created if $I1.1{file} does not exist. In the second case, if $I1.1{file} does not exist the prompt is repeated. The extension $I1.1{.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{>>}$I1.1{m0g0} $B0$head{:}$I1.1{This text will follow the previous text.} $B0$head{:}$I1.1{:} $B0$head{|**END**} $B0,3$head{>>}$I1.1{$%c} $B1$head{U0:[KBD]LP97.LAY;11 edited to U0:[KBD]LP97.LAY;12} $B0The editor (VECCE) is then called and behaves in its usual way. $B1,11$head{Cc: }KBD $B0$head{Cc: }$I1.1{*} $B0As only one addressee was named, the program then prompts for a list of names (IDs may be given for any of the recipients) of people who are to receive copies. The list will be printed in each letter. The names must be separated by $I1.1{";"} or newlines. The list must start at the first prompt and must be terminated by * on a line by itself. Responding to the first prompt with * 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 $@$I1.1{file}. $B1,3$head{Bcc: }$I1.1{RNI} $B0$head{Bcc: }$I1.1{*} $B0This is as the Cc: list, but the list is not printed on the letters. $B1,3$head{Enclosures: }$I1.1{1 Encl.} $B0The program then prompts for any mention of enclosures. Responding with $I1.1{ * } 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: }$I1.1{no} $B0Next the program asks whether the user desires to change the information that has already been provided. A response of $I1.1{yes} leads to prompts for each item that has already been entered. Each prompt consists of the query $H2{Change item?} and the current value of the item. A response of $I1.1{yes} leads to a sequence of prompts for the details of the new value of the item. After an opportunity has been given to change each item, the enquiry about changing is made again, and the sequence may be repeated as many times as is desired. A final response of $I1.1{no} to the overall enquiry about changing terminates the editing phase. $B1,5$head{Send to laser? }$I1.1{yes} $B0The file containing the letters and that containing the names and addresses for the labels will be printed since the response was $I1.1{yes}. If the response had been $I1.1{no}, the output would have been left in the files in which it had been created. $B1$head{Letters will be created in lp2:x0155.lay} $B0$head{Copy created for FILE} $B0$head{Letter created for Mrs L.Parker} $B0$head{Copy created for KBD} $B1,5$head{Names and addresses for labels are in lp2:x0154.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 $H2{x????.lay}. This is laid out for printing on sheets of adhesive labels, two labels across the sheet, seven down the sheet. $B1,6$head{Opening lp2:x0155.lay} $B0$head{Deleting lp2:x0155.lay} $B0$head{Opening lp2:x0156.lay} $B0$head{Deleting lp2:x0156.lay} $B0This is the despooler reporting as it sends files to the laser printer and deletes them. $B1$head{$$}