APM Utilities

ANALYSE : Analyse a file

The ANALYSE command displays information about a file or files.

Parameters:

Filename:
Name of file or files to be analysed. Wild cards are accepted
in the filename but not directory name.

Output file name :
File to which ANALYSE output is to be sent. (default=console)

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

CLEAN    : Clean up a directory under user control

This is a reimplementation of VAX Clean.

CLEAN {filespec} eg

          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

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.

CLEAR    : Clear the Screen(s)

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

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. FORGET gets rid of them.

Parameters: None

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

FROMBIN : Convert from Binary to Motorola (Hex) Object Module Format

GRID    : 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.

ID :    Give information about your APM

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

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

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. The extension .MOB will be appended.

LASER    : 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:
Name of file to be printed. There is a default extension of .LAY.
If <filename>.LAY does not exist, LASER will attempt to print <filename>.

Queue Enquiry:
If the additional parameter -Q or -QUEUE is specified, LASER will
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..

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

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:

"Layout 1.5 Users Guide" (H. Dewar) :

[1984]
"Laser Printer Controller - General-Purpose Protocol (Dewar/Hansen)

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

PERUSE : Examine a file-list screen by screen

PERUSE filename e.g.

         PERUSE fred:jim        looks at FRED:JIMASSWDSS
         PERUSE fred:*          all extensionless files in directory FRED
         PERUSE **              all files in current directory

This is used to peruse files.

Commands are

    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

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. 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. See also REMEMBER.

Parameter: File name

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.

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 wildfile, searchstring

          search fmacs:*,HDX    searches for 'HDX' in all extensionless
                                 files in fmacs.
          search ??
         Wildfile[*.*]:*.mob
         Searchstring:FRED       searches for FRED in .MOB's

Additional parameters:

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

If the search string contains leading or trailing spaces it should be enclosed in double quotes ("...").

SORT    : Sort a text file

This command sorts a text file line by line.

Parameters:   <infile>,<outfile>
Defaults  :   :t       :t

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

} setup cutils

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

} sort foo >bar

sorts the lines of foo into bar in ASCII order.

SUGGEST : Make a suggestion

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

TO    : Switch output to the nominated file

Console output (stream 0) is switched to the nominated file.

TOBIN    : Convert Motorola (Hex) Object Module Format to Binary

TRACE    : 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:
The trace file can be copied like any other file. This instructs
TRACE to take its input from the nominated file.

Output file:
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. The command primitive is interpreted and its name is given at the left hand side. Exceptions are..

Data packets                                  (Interpreted as <space>)
Packets where the command or reply is missing (Interpreted as '*')

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.

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

VTOT    : 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 : VIEW:VTOT

Parameters: Input File[/Output File]

Defaults:

Input File:
If the named file does not exist in the current directory, VTOT
will search VIEW:

Output File:
Default name is input file name with extension ".TEX"

WHO    : Display your current user name

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

WHOIS    : 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.

view:utilities printed on 16/02/89 at 20.25

APM Manual pages