\documentstyle[a4,12pt]{article}
\begin{document}
\author{APM Manual pages}
\title{APM Utilities}
\maketitle
\parskip .1 in
\setcounter{secnumdepth}{10}
\parindent 0in

\section{ANALYSE : Analyse a file}

The ANALYSE command displays information about a file or files.

Parameters:

Filename:
\\ \hspace*{0.6 in} Name of file or files to be analysed. Wild cards are accepted
\\ \hspace*{0.6 in} in the filename but not directory name.

Output file name :
\\ \hspace*{0.6 in} File to which ANALYSE output is to be sent. (default=console)

\small\tt \begin{verbatim}-BRIEF   One line of information about the file is displayed. This
    comprises the file name, the date the file was created 
         or last altered, access permissions, archive status, size in
         bytes and blocks and the number of extents in the file.
         No information about the file contents is produced.

-NORMAL  The same information is displayed as for -BRIEF but in a more
         readable form. 

-FULL    A full analysis of the file is produced. The file is read in
         and a line count or list of external references is produced
         for "text" or recognisable object modules respectively.

-DUMP    The file will be dumped in hexadecimal and character form.
\end{verbatim}\rm  \normalsize 

\section{CLEAN \hspace{0.2 in} : Clean up a directory under user control}

This is a reimplementation of VAX Clean.

CLEAN \{filespec\} \hspace{0.3 in} eg

\small\tt \begin{verbatim}         } CLEAN          cleans all files in curr directory
         } CLEAN  fred    cleans the file "fred"
         } CLEAN  martin: cleans all files in MARTIN:
         } CLEAN  *link*  cleans all files matching filespec
\end{verbatim}\rm  \normalsize 
This command is very similar to the standard APM command D. However extra
commands have been added to dump files,edit files (with IE or ECCE), etc.

The command is self-documenting - just type H for information.

The current version now supports cross directory filenames (of form
GJK:FRED or GJK: for all files in directory GJK) and wildcards.

IE is now supported and is called by the command IE. This facility seems
to be a bit fragile - please report any difficulties with it.


\section{CLEAR \hspace{0.2 in} : Clear the Screen(s)}

This command takes no parameters and clears both the VDU and graphics screens
if present

\section{FORGET : Remove preloaded files}

Files which it is reckoned will be frequently used can be brought into memory
and locked down using the PRELOAD command. This may result in memory being
cluttered up eventually with unwanted files. \hspace{0.2 in} FORGET gets rid of them.

Parameters: None

FORGET will prompt for each file in turn and invite you to FORGET it.


\section{FROMBIN : Convert from Binary to Motorola (Hex) Object Module Format}

\section{GRID \hspace{0.3 in} : Draw a grid on the graphics terminal}

This is an engineer's test program for checking the alignment of a graphics
monitor.

The command takes no parameters and draws a pattern of coloured "graphpaper" on
the graphics monitor. The pattern may then be moved around using the cursor
keys. The presence or absence of the whole of the lines down the side of the
screen is a sensitive indication of how well they are set up.

\section{ID : \hspace{0.4 in} Give information about your APM}

The command ID returns a brief description of your APM. There are no parameters
and the information displayed is..

\hspace*{0.3 in} Date of the main firmware and Ethernet firmware running in your APM.
\\ \hspace*{0.3 in} Your Ethernet station.
\\ \hspace*{0.3 in} Your default port and your default filestore and port.
\\ \hspace*{0.3 in} The address range and size of your Main store.
\\ \hspace*{0.3 in} The address range and size of the remaining free store.
\\ \hspace*{0.3 in} An approximate figure for the Processor speed.

\section{INSTALL : Enter an executable object module into the dictionary}

INSTALL takes a file and enters any entry points into the system dictionary.
This makes these entry points accessible to any program which declares them as
external references.

Parameter: Filename. \hspace{0.3 in} The extension .MOB will be appended.

\section{LASER \hspace{0.2 in} : Send output to the laser printer}

The LASER command queues files for printing on the laser printer and/or
interrogates the laser printer queue.

Parameters:

Filename:
\\ \hspace*{0.3 in} Name of file to be printed. There is a default extension of .LAY.
\\ \hspace*{0.3 in} If $<$filename$>$.LAY does not exist, LASER will attempt to print $<$filename$>$.

Queue Enquiry:
\\ \hspace*{0.3 in} If the additional parameter -Q or -QUEUE is specified, LASER will
\\ \hspace*{0.3 in} display the laser printer queue (after sending the file if specified).


If the specified file is in the laser printer queue already, LASER will prompt
the user for further instructions. The user may reply..

\small\tt \begin{verbatim}O      Overwrite the current copy of the file on the queue
S      Queue a second copy of the file. (Filename will be "uniqueified")
Q      Quit and not attempt to queue the file.

Failure messages:

No Authorisation         User is not on the list of accredited users.
No Access to <filename>  Specified file is not accessible in read mode
Laser failure - <text>   Laser queue is inaccessible (filestore down etc.)
\end{verbatim}\rm  \normalsize 

NOTES:

The command is available on filestore B only.

The laser printer is expensive to run so avoid printing unnecessary copies. The
command DOC:LG1 enables a laser printer LAYOUT file to be previewed on an APM
with level 1/1.5 graphics.

Text may be prepared for the laser printer using the LAYOUT text processing
package.

The LAYOUT variant used on the laser printers is described in the papers:

\hspace*{0.4 in} "Layout 1.5 Users Guide" (H. Dewar) : [1984]
\\ \hspace*{0.4 in} "Laser Printer Controller - General-Purpose Protocol (Dewar/Hansen)

\section{MAIL \hspace{0.3 in} : Display how many vax mail messages are waiting}

Parameters: [user][,user]...

The command displays the number of VAX mail messages waiting for each of the
requested users. If the user parameter is omitted altogether it will display
mail messages for the currently logged-on user.

There are no facilities (yet) for sending or receiving mail on the APMs

\section{PERUSE : Examine a file-list screen by screen}

PERUSE \hspace{0.2 in} filename \hspace{0.5 in} e.g.

\small\tt \begin{verbatim}        } PERUSE fred:jim        looks at FRED:JIMASSWDSS
        } PERUSE fred:*          all extensionless files in directory FRED
        } PERUSE **              all files in current directory
\end{verbatim}\rm  \normalsize 
This is used to peruse files.

Commands are

\small\tt \begin{verbatim}    S or <space> or <return>  
    or <Cursor DOWN>        :  Skip to next page
    R or <Cursor HOME>      :  restart at top of file
    N                       :  Moves to next file
    B                       :  Back one file
    Q                       :  Quit
    - or <Cursor UP>        :  Go back one page
\end{verbatim}\rm  \normalsize 
\section{PRELOAD : Bring a file into memory and lock it down.}

Files are generally brought into memory as required and forgotten about when
they are no longer needed. \hspace{0.2 in} This can be slow and wasteful of Ethernet and
Filestore capacity if the files are used frequently. To avoid this the files
may be PRELOADed: This brings them into store and locks them down until released
by the FORGET utility. \hspace{0.2 in} See also REMEMBER.

Parameter: File name


\section{REMEMBER: Lock a file down when next referenced}

Parameter: File name

Installs the file (assumed to be a .MOB file) in the appropriate dictionary
and marks it such that when it is next brought in (e.g. by a \%external
reference) it is locked down in store, not discarded as is usually the case.

\section{SEARCH : Search a file-list for a specified keyword}

This command takes a wild card file name and a string which is to be searched
for in all files matching the file specification.

SEARCH \hspace{0.2 in} wildfile, searchstring

\small\tt \begin{verbatim}         } search fmacs:*,HDX    searches for 'HDX' in all extensionless
                                 files in fmacs.
         } search ??
         Wildfile[*.*]:*.mob
         Searchstring:FRED       searches for FRED in .MOB's
\end{verbatim}\rm  \normalsize 
Additional parameters:

\small\tt \begin{verbatim} -Centred           Causes matches to be displayed in the centre of the
                    screen with the 36 characters on either side. 
                    Unprintable characters and newlines are replaced by '_'
 -Line    (default) The line containing the match is printed verbatim.

 -OUTput=<filename> Specifies that output from the search should go to
                    <filename>
\end{verbatim}\rm  \normalsize 
If the search string contains leading or trailing spaces it should be enclosed
in double quotes ("...").

\section{SORT \hspace{0.3 in} : Sort a text file}

This command sorts a text file line by line.

\small\tt \begin{verbatim}Parameters:   <infile>,<outfile>
Defaults  :   :t       :t
\end{verbatim}\rm  \normalsize 
Files must contain between 3 and 1024 records of up to 255 characters each.
Leading spaces will not necessarily be significant.

The routine uses a bubble sort. It is neither efficient nor elegant but works..
Invitations are offered for a better one!

Source available in FMACS:SORT

(FDC)
The Unix sort utility may be used for serious work. First say

\hspace*{0.4 in} \} setup cutils

then use as per the Unix manual, e.g.

\hspace*{0.4 in} \} sort foo $>$bar

sorts the lines of foo into bar in ASCII order.

\section{SUGGEST : Make a suggestion}

This command prompts you for a suggestion, which will be recorded along with a
record of who you are. \hspace{0.2 in} The suggestions box will be examined from time to time
and suggestions implemented as appropriate.


\section{TO \hspace{0.4 in} : Switch output to the nominated file}
Console output (stream 0) is switched to the nominated file.

\section{TOBIN \hspace{0.2 in} : Convert Motorola (Hex) Object Module Format to Binary}

\section{TRACE \hspace{0.2 in} : Trace activity on a filestore}

The Filestores each keep a circular log of all transactions with APM machines.
This lives in the special file \$:TRACE and can be displayed using the TRACE
utility.

Parameter: Context

This is the filestore local port number (It can be displayed using the ID
utility and appears in the \$:UNOS special file), assigned one per user. Default
for this parameter is the calling user's own context. Context = 0 causes all
contexts to be displayed in turn.

Additional parameters:

Input file:
\\ \hspace*{0.6 in} The trace file can be copied like any other file. This instructs
\\ \hspace*{0.6 in} TRACE to take its input from the nominated file.

Output file:
\\ \hspace*{0.6 in} File to which output is to be sent.

The trace is displayed with the commands (issued by the APM) to the left and
the matching responses (from the filestores) to the right, with a '/' to delimit
them. \hspace{0.2 in} The command primitive is interpreted and its name is given at the left
hand side. Exceptions are..

\small\tt \begin{verbatim}Data packets                                  (Interpreted as <space>)
Packets where the command or reply is missing (Interpreted as '*')
\end{verbatim}\rm  \normalsize 
If the same command/response pair occurs more than once in succession, it will
be printed once with a repeat count in square brackets to the right.


\section{TRY \hspace{0.3 in} : Load software front panel (SFP) plus a trial operating system}

This routine loads the software front panel (See HELP SFP) and then tries to
load the nominated file as a trial operating system.

This routine was supplied for the CS3 operating systems practical. Random use
will probably result in a reboot being necessary!

\section{VTOT \hspace{0.3 in} : View file to LaTeX file}

This command takes a VIEW format file as input and produces a file (default
extension .TEX) in LaTeX source.

Command \hspace{0.2 in} : VIEW:VTOT

Parameters: Input File[/Output File]

Defaults:

Input File:
\\ \hspace*{0.5 in} If the named file does not exist in the current directory, VTOT
\\ \hspace*{0.5 in} will search VIEW:

Output File:
\\ \hspace*{0.5 in} Default name is input file name with extension ".TEX"


\section{WHO \hspace{0.3 in} : Display your current user name}

This command takes no parameters and displays your user name, irrespective of
which directory you have SET to.

\section{WHOIS \hspace{0.2 in} : Find the owner of a directory}

This command searches the system manager database for the specified directory
and prints back the directory owner's name and his user group.

Parameter: List of directories separated by commas.

If no parameter is supplied the information will be given for the user who
called WHOIS.

\vspace{.75in} view:utilities printed on 16/02/89 at 20.25

\newpage
\tableofcontents
\end{document}
