\documentstyle[a4,12pt]{article}
\begin{document}
\author{Sidney Michaelson}
\title{The OFFICE utilities}
\maketitle
\parskip .1 in
\setcounter{secnumdepth}{10}
\parindent 0in
\section{Letters {\hspace{0.4 in}} 1132 22/8/88}
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.
\subsection{Abandon}
If this item is selected the program is abandoned without the creation
of any output files.

\subsection{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:-
\\ {\hspace*{0.5 in}} letters\_address
\\ {\hspace*{0.5 in}} letters\_addressees
\\ {\hspace*{0.5 in}} letters\_bcc
\\ {\hspace*{0.5 in}} letters\_cc
\\ {\hspace*{0.5 in}} letters\_create\_labels
\\ {\hspace*{0.5 in}} letters\_directory
\\ {\hspace*{0.5 in}} letters\_default\_dear
\\ {\hspace*{0.5 in}} letters\_default\_yours
\\ {\hspace*{0.5 in}} letters\_editor
\\ {\hspace*{0.5 in}} letters\_email
\\ {\hspace*{0.5 in}} letters\_enclosure
\\ {\hspace*{0.5 in}} letters\_extension

\\ {\hspace*{0.5 in}} letters\_fax
\\ {\hspace*{0.5 in}} letters\_file\_copy
\\ {\hspace*{0.5 in}} letters\_heading
\\ {\hspace*{0.5 in}} letters\_letter\_file
\\ {\hspace*{0.5 in}} letters\_my\_reference
\\ {\hspace*{0.5 in}} letters\_name
\\ {\hspace*{0.5 in}} letters\_printer
\\ {\hspace*{0.5 in}} letters\_print\_letters
\\ {\hspace*{0.5 in}} letters\_print\_labels
\\ {\hspace*{0.5 in}} letters\_sent\_by
\\ {\hspace*{0.5 in}} letters\_telephone\_number
\\ {\hspace*{0.5 in}} letters\_telex
\\ {\hspace*{0.5 in}} letters\_your\_reference

\subsection{Create output}
If you select this item at the top of the menu, 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.
This item will not take effect until values have been given to the items

{\hspace*{0.5 in}} Addressees, Letterfile and Letterhead.

\subsection{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.

\subsection{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.

\subsection{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.
\subsubsection{Addressees}
This item refers to the primary recipients of the letters. If it is
selected from the menu, a blank file is created. If any addressees have
already been named, their details are put into the file. 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
salutation 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 addrress, the salutation and the dedication may each be replaced by *.
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.

\\ {\hspace*{0.3 in}} e.g.
\\ {\hspace*{0.5 in}} Dr A.S.Wight,
\\ {\hspace*{0.5 in}} 19 St Ninian's Terrace,
\\ {\hspace*{0.5 in}} Edinburgh EH10 5NL,
\\ {\hspace*{0.5 in}} Scotland.
\\ {\hspace*{0.5 in}} *
\\ {\hspace*{0.5 in}} Alec,
\\ {\hspace*{0.5 in}} sincerely,

{\hspace*{0.5 in}} @professors

{\hspace*{0.5 in}} *


\subsubsection{Address}
If no addressees have been set, this item may be used to set an address for
one addressee. If there is already one addressee, this item may be used
to alter the address. If there is more than one, selection of this item will
have the same effect as selectioon of Addressees.
Blank lines before an address will be ignored.
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 in place when the address
is printed.
This item can be left by typing an asterisk as the only character on a line.

\subsubsection{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.

\subsubsection{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 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.

\subsubsection{Create Labels}
This item may be set to Yes or to No.
If it is set to Yes, then a file of address labels will be created, one
for each person receiving a letter.
If it is set to No, then Print Labels will be set to No.
This item may be set to Yes as a result of Print Labels having been set
to Yes.
The command variable is letters\_create\_labels.

\subsubsection{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.

\subsubsection{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.

\subsubsection{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.

\subsubsection{Editor}
The item editor must be set to ie or vecce.
The command variable is letters\_editor.

\subsubsection{Email}
This item will be printed at the end of the heading if it is neither null
nor *.
The command variable is letters\_email.

\subsubsection{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.

\subsubsection{Extension}
An extension which is neither null nor * will be printed if the telephone
number is printed.
The command variable is letters\_extension.

\subsubsection{Fax}
This item should be set to the Fax address of the sender.
The command variable is letters\_fax.

\subsubsection{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.

\subsubsection{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.

\subsubsection{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.

\subsubsection{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.

\subsubsection{Name}
This item may be used, if there is at most one addressee, to set or
alter the name.
If several addressees have already been set, selecting this item will
have the same effect as selecting Addressees.

\subsubsection{Printer}
This item must be set to lp2 or lp3 or Emas, these being the only printers
which handle Layout 2.0. The Emas name of the printer is .DPG15, but for
the prurposes of this program at present it is known as just "emas".

\subsubsection{Print Labels}
If this item is set to Yes, Create Labels will also be set to Yes and a
file will be created containing the name and address of every recipient,
scaled to fit into a label, and that file will be 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.
If Create Labels is set to No, this item will be set to No.
The command variable is letters\_print\_labels.

\subsubsection{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.

\subsubsection{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 command variable after the end of
the description.

e.g.
\\ {\hspace*{0.5 in}} \$assign "S.Michaelson," letters\_sent\_by1
\\ {\hspace*{0.5 in}} \$assign "Chairman of the School of IT." letters\_sent\_by2
\\ {\hspace*{0.5 in}} \$assign "*" letters\_sent\_by3.

\subsubsection{Telephone Number}
If this item is set to *, the telephone number will be omitted from the
heading.
The command variable is letters\_telephone\_number.

\subsubsection{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.

\subsubsection{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.




\section{Memo21 {\hspace{0.3 in}} 1742 {\hspace{0.2 in}} 31/8/88}
The program Memo prepares memoranda in a standard format.
It sends the resulting file to a printer queue or to a transfer queue for the
Emas laser printer.
The preparation of the body of the memorandum is done through an editor.
The edited version of the body of the memorandum is left for
future use.
The user can choose whether or not to have a file-copy made of the memorandum.
For your convenience you may wish to insert into your login.com file the line:-

\$newmemo:==r u0:[sm.office]memo
\subsection{From: .}
This expects an identifier (e.g. Vax ID) of the sender of the memorandum.
It will appear on all copies made.

\subsection{To: .}
This expects a list of the recipients of the copies of the memorandum. The
recipients may be identified by their names or their IDs or in any other
covenient way. Several identifiers may be put on the same line, but must
be separated by semi-colons in that case. Room numbers may be included
in the identifiers for the benefit of those delivering the memoranda.
The list must end with an asterisk on a line by itself.

{\hspace*{0.3 in}} E.g.
\\ {\hspace*{0.3 in}} To: PDS; RNI; KBD; RAM, Room 2507; GDMR
\\ {\hspace*{0.3 in}} To: EAK; Russ Green
\\ {\hspace*{0.3 in}} To: *


\subsection{Memo-file: .}
This expects the name of a file to hold the body of the memorandum. It
may contain all or some or an incorect version of the memorandum, since it
will be taken as the parameter of the editor selected by the current value
of the command variable MEMO\_EDITOR.
The user can provide a different file name for the result of editing, so
that the original version of the file still remains available.

{\hspace*{0.3 in}} e.g.
\\ {\hspace*{0.3 in}} Memo-file: memorandum
\\ {\hspace*{0.3 in}} or
\\ {\hspace*{0.3 in}} Memo-file: memorandum/newmemo {\hspace{0.7 in}} for Vecce.


\subsection{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, until the end of the session or the next
assignment to the same variable.
The assignment 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:-

{\hspace*{0.5 in}} memo\_editor
\\ {\hspace*{0.5 in}} mem\_file\_copy
\\ {\hspace*{0.5 in}} memo\_printer

The effect of an assignment is to override any existing assignment, until
the end of the session or the next assignment to the same variable.

{\hspace*{0.3 in}} e.g.
\\ {\hspace*{0.3 in}} \$ assign "no" memo\_file\_copy

\subsubsection{ Memo\_editor}
The editors which are known to Memo are IE and Vecce. the default is Vecce.
The asssignment is of the form

\$ assign "ie" memo\_editor


\subsubsection{Memo\_file\_copy}
This takes the values yes and no. The default is yes. the assignment is
of the form

\$ assign "yes" memo\_file\_copy


\subsubsection{Memo\_printer}
The printers which are known to Memo are lp2 and emas. The emas
name of the printer is .DPG15 and it is housed in room 3210 of the JCMB.
For the purposes of this program it is known as just emas.
The default is lp2, the printer in Mrs Duncan's room.
The assignment is of the form

\$ assign "emas" memo\_printer


\subsection{A specimen session.}
A sample session follows. In another section, the same session is shown
with explanatory notes.

\small\tt \begin{verbatim}$newmemo
From: SSM
To: KBD;HLC
To: DAM, Room 1419
To: *
Memo-file: memo35
Editing U0:[KBD.SM]MEMO35.LAY;1

This is the text that was originally in the file that was nominated
to hold the memorandum.
>>m0g0
:This is some additional text which will be put after the text
that is printed above.
::
|**END**
>>%c
U0:[KBD.SM]MEMO35.LAY;1 edited to U0:[KBD.SM]MEMO35.LAY;2
You may change any item other than the permanent heading by
answering "yes" to the next prompt.
Changes? yes
For each item that may be changed you will be shown the prompt and
the current value. Respond with yes if you wish to change its value,
and give the new value in response to the prompt that follows.
Change From: ? SSM
yes/no: yes
From: SM
Change To: ?
KBD
HLC
DAM, Room 1419
yes/no: n
Change Memo-file: ?[KBD.SM]MEMO35.LAY
yes/no n
Changes? n
Print memos? y
Sending U0:[KBD.SM]X04A1R.LAY;1 to B::LP2:X04A1R.LAY
Disconnecting...
x04a1r.lay;1 deleted
$
\end{verbatim}\rm  \normalsize 
\subsection{ Specimen session with notes.}

\small\tt \begin{verbatim}$newmemo
From: SSM
    The sender's name or other identifier will be printed in the heading.
To: KBD;HLC
To: DAM, Room 1419
To: *
\end{verbatim}\rm  \normalsize 
A list of names or other identifications (e.g. Vax IDs) of recipients
is wanted. The identifiers must be separated by semi-colons or newlines.
The list must end with asterisk (*) on a line by itself.
A file of identities may be given in one or several places in the list by
using the form @file. Each list presented in a file must end with
asterisk (*) on a line by itself and the list given at the console
must also end in the same way, with * on a line by itself.
\small\tt \begin{verbatim}
Memo-file: memo35

\end{verbatim}\rm  \normalsize {\hspace*{0.3 in}} The program asks for the name of a file to hold the body of the memorandum.
\\ {\hspace*{0.3 in}} The response must be one of the normal forms for the parameter of the editor
\\ {\hspace*{0.3 in}} about to be called. In this case the editor will be Vecce, and the response
\\ {\hspace*{0.3 in}} must be one of the forms File or File/Newfile.
\\ {\hspace*{0.3 in}} In the first case, if the file does not already exist a new file will be
\\ {\hspace*{0.3 in}} created. In the second case, if the file does not already exist this will
\\ {\hspace*{0.3 in}} be reported and the user given an opportunity to provide a new file-name.
\\ {\hspace*{0.3 in}} File names will be extended by `.lay' if no extension is given.
\\ {\hspace*{0.3 in}} The editor is then entered.

\small\tt \begin{verbatim}This is the text that was originally in the file that was nominated
to hold the memorandum.
>>m0g0
:This is some additional text which will be put after the text
:that is printed above.
::
|**END**
>>%c
U0:[KBD.SM]MEMO35.LAY;1 edited to U0:[KBD.SM]MEMO35.LAY;2
\end{verbatim}\rm  \normalsize 
The editor is entered and behaves as usual.

\small\tt \begin{verbatim}You may change any item other than the permanent heading by
answering "yes" to the next prompt.
Changes? yes
For each item that may be changed you will be shown the prompt and
the current value. Respond with yes if you wish to change its value,
and give the new value in response to the prompt that follows.
Change From: ? SSM
yes/no: yes
From: SM
Change To: ?
KBD
HLC
DAM, Room 1419
yes/no: n
Changes? n
\end{verbatim}\rm  \normalsize 
The cycle of prompts and values continues until the response to the
general query about changes is \$I1.2\{no\}.

\small\tt \begin{verbatim}Print memos? y
Sending [KBD.SM]X04A1R.LAY;2 to B::LP2:X04A1R.LAY
Disconnecting...
x04a1r.lay deleted.
\end{verbatim}\rm  \normalsize 
If the response to the last prompt had been no, the memoranda would
have been left in X04A1R.lay.
Since it was yes the file will be sent to B::LP2: and destroyed.
The file will be printed in its turn.

\small\tt \begin{verbatim}$
\end{verbatim}\rm  \normalsize 


\section{Labelshelp 4/10/88}
The program labels21 accepts a list of names and addreses and
prints labels.
The text lines will be left-aligned on the label. Lines which are
too long for the width of the label will be folded, the folded
portions will be aligned to 3 spaces in from the left hand margin
of the label.

\subsection{Address-file.}
This is the name of a file containing the names and addresses
to be printed.
If .end if typed as the name of the file, the program will stop.
Each address must end with an asterisk on a line by itself.
There must be a name for,each label.
If an asterisk is given instead of a name, the program takes it to
mean that the file is ended.
There is no need for a marker for the end of the file, the program just
recognises when it has read the whole file.
For example:

{\hspace*{0.3 in}} Prof.R.N.Ibbett
\\ {\hspace*{0.3 in}} Department of Computer Science,
\\ {\hspace*{0.3 in}} Edinburgh University,
\\ {\hspace*{0.3 in}} J.C.M.B.,
\\ {\hspace*{0.3 in}} The King's Buildings,
\\ {\hspace*{0.3 in}} Edinburgh EH9 3JZ.

{\hspace*{0.3 in}} Professor R.Hartenstein
\\ {\hspace*{0.3 in}} Lehrstuhl fur Technerorganisation,
\\ {\hspace*{0.3 in}} Universitat Kaiserslautern,
\\ {\hspace*{0.3 in}} FB Informatik,
\\ {\hspace*{0.3 in}} Postfach 3049,
\\ {\hspace*{0.3 in}} D-6750 Kaiserslautern. F.R.G.
\\ {\hspace*{0.3 in}} *

\subsection{Parameters.}
There is one parameter, the printer to which labels are to be sent.
This must be set-up by assignment to the parameter labels\_printer, the
form being

\$ assign "lp2" labels\_printer

The printers which are known to the program are "emas" and "lp2".
The assignement may be made from the keyboard or from a login.com file.
\subsubsection{Printer.}
This may be either lp2 or Emas. Lp2 is in Kate Duncan's office. The
Emas printer is in JCMB 3212.
The name of the printer may be set beforehand by an assignment to
Badges\_printer, either in a login file or from the keyboard.




\section{Badgeshelp 10/11/88}
The program Badges21 accepts a list of names and affiliations and
prints labels for cutting up and sticking to card for insertion in badges.
The labels may have the University badge in the top left hand corner, up to
two lines of the name of the meeting, the name of the member in bold type
and the name of his department and organisation. Any of these items may
be omittted from the badge by supplying an asterisk in its place.
The text lines will be centred on the badge.
The name of the meeting is set in the initial stage of the program,
using the menu.

\subsection{Editor.}
The item Editor must be set to ie or vecce. This may be done by assign-
ment to a command variable in a login file or at the keyboard, before
the program is called, or by using the menu which the program displays.
The command variable is badges\_editor.
The program can deal with only IE or Vecce.

\subsection{Title.}
This is a multi-line item. Its end must be indicated by typing an asterisk
on a line by itself.It must be provided by selecting Title from the menu,
whereupon the editor will be entered to enable the user to edit the current
version of the title (which may be blank) in a temporary workfile.
The result in the menu may be something like:-

{\hspace*{0.3 in}} Title: Workshop on the Effects of
\\ {\hspace*{0.3 in}} Title: Alcohol on the System.
\\ {\hspace*{0.3 in}} Title: *

If only the asterisk is supplied, no space will be left on the badge
for the title unless the crest is printed.
Blank lines will be ignored.
If the title has mopre than two non-blank lines, the fact will be reported
and the first offending line will be preceded by a copy of the report. This
will have to be removed when the title is edited to correct it.
If a line of the title is too long to fit in the label, allowing for the
University badge if it has been specified in the menu, it will be
reported and the offending line will be marked at the maximum acceptable
length. the report, once again, will also be present in the file to be
edited when the title is corrected.
The program will not proceed to produce any output until a short enough
title has been provided.

\subsection{Name list.}
This is the name of a file containing the names and affiliations
to be printed.
Normally the name of the file will be provided via the menu.
The name of the file may be set beforehand by an assignmant to
badges\_name\_list, either in a login file or from the keyboard.
Each badge entry consists of 3 parts; they are the name, the Department
and the affiliation. Each of these consists of a single non-blank line.
Blank lines may be used as separators and will be thrown away by the
program.
To suppress printing of the name or the affiliation or the department, an
asterisk must be supplied in its place.
There is no marker for the end of the file, the program just recognises
when it has read the whole file.

For example:

{\hspace*{0.3 in}} Prof.R.N.Ibbett
\\ {\hspace*{0.3 in}} Computer Science
\\ {\hspace*{0.3 in}} Edinburgh University

{\hspace*{0.3 in}} Dr Heather Brown
\\ {\hspace*{0.3 in}} *
\\ {\hspace*{0.3 in}} Kent University

{\hspace*{0.3 in}} Mr P.D.Schofield
\\ {\hspace*{0.3 in}} *
\\ {\hspace*{0.3 in}} Edinburgh University

{\hspace*{0.3 in}} Professor R.Hartenstein
\\ {\hspace*{0.3 in}} *
\\ {\hspace*{0.3 in}} *



\subsection{Parameters.}
There are some parameters which govern the general behaviour of the
program. These may be set by means of a menu which is displayed when
the program is called. the items in the menu are selected, one at a time,
by using the cursor keys to move the cursor up and down to the right line,
and pressing the key marked $<$RETURN$>$. The new value can then be typed
at the position of the cursor and entered by pressing the key $<$RETURN$>$
or $<$ENTER$>$. The value may also be given by assignment, of the form
\$ assign $<$value$>$ badges\_$<$parameter$>$, before entering the program,
either from the keyboard or from a login file.
For example:

{\hspace*{0.3 in}} \$ assign "yes" badges\_badge
\\ {\hspace*{0.3 in}} \$ assign "no" badges\_delete\_output
\\ {\hspace*{0.3 in}} \$ assign "yes" badges\_print\_output


The Command Variables that can be set are

{\hspace*{0.3 in}} Badges\_badge
\\ {\hspace*{0.3 in}} Badges\_print\_badges
\\ {\hspace*{0.3 in}} Badges\_destroy\_output
\\ {\hspace*{0.3 in}} Badges\_editor
\\ {\hspace*{0.3 in}} Badges\_printer
\\ {\hspace*{0.3 in}} Badges\_sticky\_labels

\subsubsection{Badge.}
This controls whether the University crest is printed on the member's
badge. It must be set to y or n.
It can be set by assignment to the command variable badges\_badge

\subsubsection{Delete Output}
If this is set to "y":, the output file will be deleted after a copy
has been sent to a laser printer, otherwise it will be left for
editing or sending at a later date.
The parameter can be set beforehand by an assignment to badges\_delete\_output
either in a login file or from the keyboard.

\subsubsection{Print Badges.}
If this is set to "y", the output file will be sent to a laser printer.
If this is set to "n", the output file will not be deleted at the end
of the program.
The value of Print\_badges may also be set beforehand by an asignment to
Badges\_print\_badges, either in a login file or from the keyboard.

\subsubsection{Printer.}
This may be set to either lp2 or Emas. Lp2 is in Kate Duncan's office.
The Emas printer is in JCMB 3212.
The name of the printer may also be set beforehand by an assignment to
Badges\_printer, either in a login file or from the keyboard.

\subsubsection{Sticky Lablels.}
If this is set to "y" then a front sheet will be printed to warn the user
to insert a suitable number of sheets of sticky labels. The printer will
then pause until it is instructed to continue by pressure on the button.
If this parameter is set to "n", the labels will be printed as soon as
the printer receives the file sent by this program.
This parameter may also be set bnefore running the program, either from the
keyboard or by an assignment in the login file.




\section{Menus}
\subsection{Cursor Depth}
This is a function which allows the cursor to be moved up and down by the
cursor keys. It ignores all others apaprt from $<$RET$>$. When that is typed, the
index of the item that is pointed at by the cursor is returned as the value.
When the cursor is moved, it is placed against the first line of the next or
previous item, at the start of the line.

The specification of the function is

\%externalintegerfnspec cursor depth

\subsection{Set up Menu}
The routine Set Up Menu expects the data to be given to it as an array of
records of format dataf(\%string(19) name, \%record(line80listf) val).

Each Value is expected to be a list of lines.

The routine has the specification

\%externalroutinespec set up menu(\%record(dataf)\%arrayname data,
\%integerarrayname select)

The two parameters must have dimension from 0 upwards. The first element
of the data array must be the item which makes to program contiue. The last
element must be the item which abandons the program. The array Select must
give the indices of the items in the order in which they are to be displayed
in the menu.

\subsection{Write Menus}
A menu of items and their values is displayed a page at a time. An item may
be selected by moving the cursor with the arrowed keys and pressing the
return key when the item is reached. This will move the cursor along the line
of the menu to where a value may be typed in (followed by $<$RET$>$) to replace
that displayed. It is permissible to change a value that has been inserted.
Tne next page may be displayed by moving the cursor off the bottom of the
current page and the previous page by moving the cursor off the top of the
current page.

The program may be directed to continue its operations by selecting the
top line of any page of the menu. The program may be abandoned by
selecting the bottom line of any page. If any file has been edited,
the editing will remain effective however the program is left.



21:14 25/10/87
\section{Personal Database 1519 9/2/88}
The program Persdbs is intended to help the creation and maintenance of
a file of records containing data about people. It uses the format
Personf for the records that are put into and retrieved from files. It
uses a menu package to deal with the visual representation of those
records. It permits the addition, deletion and editing of records.
For the convenience of the user it will accept some information in the
form of command variables.

The program is menu-driven. The first menu lists the commands, any of
which may be chosen by moving the cursor to it and pressing $<$RETURN$>$.
Information about a command may be obtained by typing ? before $<$RETURN$>$.
The commands lead to further menus which invite values of file-names
for input and output, data for the command to use and entry to the
command.
\subsection{Commands}
The commands available through a menu are:-

\subsubsection{Abandon}
This returns to the VMS command level, without closing any of the files
which are currently open.

\subsubsection{Edit}
This copies the contents of one file into another. It reads a record
at a time and presents it in a menu, giving the opportunity for the user
to alter any item. Single-line items, such as Surname, are changed by
being re-typed. Multi-line items are written to a work-file and then the
editor is called so that the user can alter them.
When the menu-line Next Person is called, the record is written to the
output file and a new record is read and displayed.
When the menu-line Find is called, the user is prompted for a pattern,
which is part or the whole of a record, and the current record and
those in the rest of the input file are scanned until a match to the
pattern is found or the end of the file is reached. Records which do not
match are copied to the output, the first which does match is held as the
current record.

\subsubsection{Merge Files}
This command calls for two input files and merges their records in order
into a single output file.

\subsubsection{Select Records.}
This command calls for two input files and an output file.
It presents a menu for the user to insert a pattern. When the
menu-line Pattern Ready is selected, the input file is searched for
matching records which are copied to the output file.

\subsubsection{Set Editor}
This requests the user to give the name of the editor to be used in
changing multi-line items of information.
At present the only editors known to the program are Vecce and IE.

\subsubsection{Sort Records}
This command asks for an input file and an output file. It sorts all the
records in the input file into order and puts them into the output file.

\subsubsection{Stop}
This closes the input and output files and returns to command level.


\subsection{Command Variables}

Persdbs\_editor {\hspace{0.5 in}} This may be set to "Vecce" or "ie"

\subsection{Order}
The order of two records is determined by comparing items in succession
in the order ID, surname, forenames and office address.
IDs are treated specially.
IDs are compared by their last letter first (considered to be the first
letter of a surname) and then the preceding letters are compared as
strings, from left to right.
Thus ASW follows PDS but FS precedes both of them.
For the other items, string order is used, line by line for multi-line
items.
If any item, other than the ID, in either record is an * the comparison
of that item is skipped.
For IDs, an asterisk follows any other ID.

\subsection{Record Items}
Each persons's record contains 19 items. They are listed below in
alphabetical order. The items will be displayed in a menu.
An item may be selected by moving the cursor to the right line by means
of the up- and down-arrow keys. To set or change the item, just press the
$<$RETURN$>$ key after selecting the item.
If the item is allocated a single line the cursor will move to a blank
space on the line. If you then type the new value for the item and follow
it by pressing the $<$RETURN$>$ key again the new value will be assigned to
the selected item.

If the item is allocated several lines, such as an address, the current
value will be put into a work-file and the editor will be entered to
enable the user to edit the value as he sees fit. On leaving the editor
in the usual way, the menu will be re-written to display the new value.
Helpful information about an item may be obtained by typing a question
mark and pressing the $<$RETURN$>$ key after moving the cursor to the correct
line. This will not affect the value of the item, but will overwrite the
menu with a page provided by the View package.
When you leave the View package, by typing $<$CTRL$>$z, the menu will be
re-written.

\subsubsection{Degrees}
This expects a single line of text, giving the letters to be placed after
the surname, in the usual form, e.g. PhD,FBCS.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Department}
This expects a single line of text, giving the name of the Department to
which the person belongs.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Email address}
This expects a single line of text giving the person's Email address.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Extension}
This expects a single line of text giving the person's extension from
his office telephone number.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Extra}
This expects one or more lines of text giving additional information
about the person, e.g. that he is a Director of Studies.
More than one item may be typed on a single line, separated by semi-
colons.
The information must end with an asterisk on a line by itself.
If this item is to be omitted, the asterisk must still be provided.

\subsubsection{Fax}
This expects a single line of text giving the BT Facsimile number.
If there is not any Fax for the user, an asterisk should be typed.

\subsubsection{Firm}
This expects a single line of text giving the name of the firm with which
the person is associated.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Forenames}
This expects a single line of text giving the person's forenames.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Home address}
This expects one or more lines of text giving the home address of the
person in the usual form.
The address must be ended with an asterisk on a line by itself.
If this item is to be omitted, the asterisk must still be provided.

\subsubsection{Home telephone}
This expects a single line of text giving the person's home tlephone
number.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{ID}
This expects a single line of text giving an abbreviated identifier
for the person, such as his user ID on Ecsvax.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Initials}
This expects a single line of text giving the person's initials.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Interests}
This expects one or more lines of text giving the person's interests,
largely for selective dissemination of information.
More than one item may be typed on a single line, separated by semi-
colons.
The information must end with an asterisk on a line by itself.
If this item is to be omitted, the asterisk must still be provided.

\subsubsection{Office address}
This expects one or more lines of text giving the office address of the
person in the usual form.
The address must be ended with an asterisk on a line by itself.
If this item is to be omitted, the asterisk must still be provided.

\subsubsection{Office Telephone}
This expects a single line of text giving the person's office tlephone
number.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Room}
This expects a single line of text giving the number of the room which
serves as the person's office.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Style}
This expects a single line of text giving the person's title or other
style of address, e.g. The Reverend.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Surname}
This expects a single line of text giving the person's surname.
If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Telex}
This expects a single line of text giving the Telex address to which m
messages may be sent for the person. The reply should be included,

{\hspace*{0.3 in}} e.g. {\hspace{0.2 in}} 742477 UNIVED G.

If this item is to be omitted, an asterisk should be typed instead.

\subsubsection{Specimen Record}
\small\tt \begin{verbatim} Style              Mr
 Initials           A.A.
 Surname            Aardvark
 Degrees            FRSA, D.AE,
 Forenames          Aaron Absolom
 ID                 AAAA
 Email address      AAAA@uk.ac.ed
 Department         Computer Science
 Room               2695
 Firm               Edinburgh University
 Office address     Edinburgh University
                    James Clerk Maxwell Building
                    The King's Buildings
                    Mayfield Road
                    Edinburgh EH9 3JZ
                    Scotland
                    *
 Office telephone   (031) 667 1081
 Extension          3420
 Fax                031 667 7938
 Telex              727442 (UNIVED G)
 Interests          Ants
                    Eating
                    Burrows
                    *
 Home address       1 African Road
                    Edinburgh EH16 5AB
                    Scotland
                    *
 Home telephone     031 667 2200
 Extra              Heating
                    *
\rm}                    



\section{ Personshelp 22:00  22/8/88}
This is about a package of procedures used by Labels, letters, memo and Persdbs.
\subsection{Address.}
This requires an address, line by line, ending with an asterisk(*)
on a line by itself.

\subsection{Degrees.}
This requires the degrees and honours of the person, in the usual form
to follow the name.

\subsection{Department. }
This requires the name of the Department. If the name given is EUCS then
the Department is filled in as Computer Science, the KB address and phone-
number are supplied and so is the University's telex number.

\subsection{Emailaddress. }
This is for your electronic mail address in the UK form,

e.g.    sm@uk.ac.edinburgh.ecsvax


\subsection{Extension. }
This requires the senders extension on from his Departmental telephone
number.

\subsection{Extra. }
This requires any comments or other unspecified information.

\subsection{Firm. }
This requires the name of the firm with which this person is associated.

\subsection{Forenames. }
This requires the forenames.

\subsection{Home Address. }
This requires an address in the usual form, ending with an asterisk(*)
on a line by itself.

\subsection{Home Phone. }
This requires the home telephone number.

\subsection{Id. }
This requires an identifier, such as the Vax user-name e.g. KBD.

\subsection{Initials. }
This requires the intials of the person.

\subsection{Interests. }
This requires the interests of the person, one to a line. The sequence
must be ended with an asterisk(*) on a line by itself.

\subsection{Office address. }
This requires the persons office address in the usual form, terminated
by an asterisk(*) on a line by itself.

\subsection{Office phone. }
This requires the telephone number of the person's office.

\subsection{Room. }
This requires the room-number of the person's office in the building in which
his Department is situated.

\subsection{Skip to @.}
This requires @ to terminate input of a record.

\subsection{Style. }
This requires the style that precedes the person's name.

\subsection{Surname. }
This requires the person's surname.

\subsection{Telex. }
This requires the person's telex number.


\vspace{.75in} office.hlp printed on 20/02/89 at 13.57

\newpage
\tableofcontents
\end{document}
