!{The OFFICE utilities/Sidney Michaelson}
!<Letters      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.
!<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, 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

        Addressees, Letterfile and Letterhead.
!>  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.
!<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.
!PAGE
    e.g.
        Dr A.S.Wight,
        19 St Ninian's Terrace,
        Edinburgh EH10 5NL,
        Scotland.
        *
        Alec,
        sincerely,
        
        @professors
        
        *
        
!>  End of Addrressees.
!<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.
!>  End of Address.
!<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 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 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.
!>  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 telephone
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, 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.
!>  End of Name.
!<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".
!>  End of Printer.
!<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.
!> 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 command variable after the end of
the description.

e.g.
        $assign "S.Michaelson," letters_sent_by1
        $assign "Chairman of the School of IT." letters_sent_by2
        $assign "*" letters_sent_by3.
!>  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.

!<Memo21    1742   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
!<From: .
This expects an identifier (e.g. Vax ID) of the sender of the memorandum.
It will appear on all copies made.
!> End of From.
!<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.

    E.g.
    To: PDS; RNI; KBD; RAM, Room 2507; GDMR
    To: EAK; Russ Green
    To: *

!> End of To.
!<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.

    e.g.
    Memo-file: memorandum
    or
    Memo-file: memorandum/newmemo          for Vecce.

!> End of Memo-file.
!<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:-

        memo_editor
        mem_file_copy
        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.

    e.g.
    $ assign "no" memo_file_copy

!< 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

!> End of Memo_editor
!<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

!> End of Memo_file_copy.
!<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
!> End of memo_printer.
!>  End of Command Variable.
!<A specimen session.
A sample session follows. In another section, the same session is shown
with explanatory notes.

!{\tt}
$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
$
!{\rm}
!> End of specimen session.
!< Specimen session with notes.

!{\tt}
$newmemo
From: SSM
    The sender's name or other identifier will be printed in the heading.
To: KBD;HLC
To: DAM, Room 1419
To: *
!{\rm}

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.
!{\tt}

Memo-file: memo35

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

!{\tt}
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
!{\rm}

The editor is entered and behaves as usual.

!{\tt}
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
!{\rm}

The cycle of prompts and values continues until the response to the
general query about changes is $I1.2{no}.

!{\tt}
Print memos? y
Sending [KBD.SM]X04A1R.LAY;2 to B::LP2:X04A1R.LAY
Disconnecting...
x04a1r.lay deleted.
!{\rm}

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.

!{\tt}
$
!{\rm}
!> End of annotated specimen session.
!> End of Memohelp.

!<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.

!<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:

    Prof.R.N.Ibbett
    Department of Computer Science,
    Edinburgh University,
    J.C.M.B.,
    The King's Buildings,
    Edinburgh EH9 3JZ.

    Professor R.Hartenstein
    Lehrstuhl fur Technerorganisation,
    Universitat Kaiserslautern,
    FB Informatik,
    Postfach 3049,
    D-6750 Kaiserslautern. F.R.G.
    *
!>  End of Name list.
!<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.
!<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.
!>  End of Printer.
!>  End of Parameters.
!>  End of Labels21help.

!<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.

!<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.
!>  End of Editor.
!<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:-

    Title: Workshop on the Effects of
    Title: Alcohol on the System.
    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.
!>  End of Title.
!<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.
!PAGE
For example:

    Prof.R.N.Ibbett
    Computer Science
    Edinburgh University

    Dr Heather Brown
    *
    Kent University

    Mr P.D.Schofield
    *
    Edinburgh University

    Professor R.Hartenstein
    *
    *


!>  End of Name list.
!<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:

    $ assign "yes" badges_badge
    $ assign "no" badges_delete_output
    $ assign "yes" badges_print_output

!PAGE
The Command Variables that can be set are

    Badges_badge
    Badges_print_badges
    Badges_destroy_output
    Badges_editor
    Badges_printer
    Badges_sticky_labels

!<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
!>  End of Badge.
!<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.
!>  End of Delete Output.
!<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.
!>  End of Print Badges.
!<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.
!>  End of Printer.
!<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.
!>  End of Sticky Labels.
!>  End of Parameters.
!>  End of Badges21help.

!<Menus
!<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
!> End of Cursor Depth.
!<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.
!> End of Set up Menu.
!<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.
!> End of Write Menus.
!> End of Menus.

21:14  25/10/87
!<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.
!<Commands
The commands available through a menu are:-

!<Abandon
This returns to the VMS command level, without closing any of the files
which are currently open.
!> End of Abandon.
!<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.
!> End of Edit.
!<Merge Files
This command calls for two input files and merges their records in order
into a single output file.
!> End of Merge Files.
!<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.
!> End of Select Records.
!<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.
!> End of Set Editor.
!<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.
!> End of Sort Records.
!<Stop
This closes the input and output files and returns to command level.
!> End of Stop.
!>End of Commands.
!<Command Variables

Persdbs_editor        This may be set to "Vecce" or "ie"
!> End of Command Variables.
!<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. 
!> End of Order
!<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.
!PAGE
!<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.
!> End of Degrees
!<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.
!> End of Department
!<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.
!> End of Email address
!<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.
!> End of Extension
!<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.
!> End of Extra
!<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.
!> End of Fax
!<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.
!> End of Firm
!<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.
!> End of Forenames
!<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.
!> End of Home address
!<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.
!> End of Home telephone
!<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.
!> End of ID
!<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.
!> End of Initials
!<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.
!> End of Interests
!<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.
!> End of Office address
!<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.
!> End of Office Telephone
!<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.
!> End of Room
!<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.
!> End of Style
!<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.
!> End of Surname
!<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,

    e.g.   742477  UNIVED G.

If this item is to be omitted, an asterisk should be typed instead.
!> End of Telex
!<Specimen Record
!{\tt}
 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}                    
!> End of Specimen Record.
!> End of Record Items.
!> End of Persdbs.

!< Personshelp 22:00  22/8/88
This is about a package of procedures used by Labels, letters, memo and Persdbs.
!<Address.
This requires an address, line by line, ending with an asterisk(*)
on a line by itself.
!> End of Address.
!<Degrees.
This requires the degrees and honours of the person, in the usual form
to follow the name.
!> End of Degrees.
!<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.
!> End of Department.
!<Emailaddress. 
This is for your electronic mail address in the UK form,

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

!> End of Email address.
!<Extension. 
This requires the senders extension on from his Departmental telephone
number.
!> End of Extension.
!<Extra. 
This requires any comments or other unspecified information.
!> End of Extra.
!<Firm. 
This requires the name of the firm with which this person is associated.
!> End of Firm.
!<Forenames. 
This requires the forenames.
!> End of Forenames.
!<Home Address. 
This requires an address in the usual form, ending with an asterisk(*)
on a line by itself.
!> End of Home Address.
!<Home Phone. 
This requires the home telephone number.
!> End of Home Phone.
!<Id. 
This requires an identifier, such as the Vax user-name e.g. KBD.
!> End of Id.
!<Initials. 
This requires the intials of the person.
!> End of Initials.
!<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.
!> End of Interests.
!<Office address. 
This requires the persons office address in the usual form, terminated
by an asterisk(*) on a line by itself.
!> End of Office address.
!<Office phone. 
This requires the telephone number of the person's office.
!> End of Office phone.
!<Room. 
This requires the room-number of the person's office in the building in which
his Department is situated.
!> End of Room.
!<Skip to @.
This requires @ to terminate input of a record.
!> End of Skip to @.
!<Style. 
This requires the style that precedes the person's name.
!> End of Style.
!<Surname. 
This requires the person's surname.
!> End of Surname.
!<Telex. 
This requires the person's telex number.
!> End of Telex.
!> End of Personshelp.
