Once how you've learnt how to work with files in MTS it's easy to use the built in MTS commands - there are less than 50 commands and they follow the same basic syntax.

This post will give a quick tour of the commands available in MTS. I've grouped them by topic and provided a very brief summary for each.

As always, you can optionally start commands with $, commands can be abbreviated, eg FILESTATUS to FI, and there are some command synonyms shown with / below, such as HELP/EXPLAIN.

General commands

COMMENT - ignored line, can also use *
DISPLAY - show parameters and settings
HELP/EXPLAIN - interactive help system
MTS - return to MTS command mode from another program
SET - set MTS global options

SET and DISPLAY respectively set and show a large number of different settings such as printer settings, passwords, how MTS displays help etc.

File commands

COPY - copy lines to files
CREATE - create a new file
DESTROY - remove a file
DUPLICATE - create a duplicate of a file, making a new file if needed
EDIT - edit a file
EMPTY - remove contents of a file or set of files
FILEMENU - interactive selection of files
FILESTATUS - view information about files
LIST - display files
LOCK - lock a file
LOCKSTATUS - display status of locks on files
PERMIT - grant access to files
RENAME - rename a file or set of files
RENUMBER - renumber a line file
TRUNCATE - remove unused space at end of file
UNLOCK - unlock a file

A quick illustration of the difference between COPY and DUPLICATE:

# create x
  File "X" has been created.
# copy *source* x
> Hello world
> Welcome to MTS
> Goodbye!
> $endfile
# list x

       1     Hello world
       2     Welcome to MTS
       3     Goodbye!
# create y
  File "Y" has been created.
# copy x(2,3) y
# list y

       1     Welcome to MTS
       2     Goodbye!
# duplicate x z
  File "X" has been duplicated as "Z"; size=1 page; access=Unlim Owner,
   None Others
# list z

       1     Hello world
       2     Welcome to MTS
       3     Goodbye!

EMPTY effectively deletes a file and then recreates it with no contents. TRUNCATE will remove space allocated to the file but not used - handy for when disk usage was paid for but less so on an emulated system.

Sessions

LOG - log session to a file
SIGNOFF - log out of the system
SIGNON - log into the system

Run programs

RERUN - reissue the previous RUN command, optionally changing parameters
RUN - run a program
SINK - send output to a file/device
SOURCE - take input from a file/device

Devices and queues

CONTROL - operations on files and devices, eg rewind a tape
CANCEL - stop batch or print jobs
MOUNT - mount tapes
RELEASE - stop using a psuedodevice like tape

System information

SYSTEMSTATUS - show system status, eg tasks or queues

Utilities

CALC - desktop calculator

Programming

ALTER/MODIFY - change contents of a register or shared memory
DEBUG - load a program and enter debug command mode
DUMP - print out register and CPU information
IF - test a condition, usually for use in a batch file
LOAD - load a program into memory but don't execute it yet
MAKE - keep interrelated files in an consistent state
RESTART/START - restart a program, eg after an error
SDS - transfer control to debug mode
UNLOAD - remove a previously loaded program from memory

Other commands of less use for Hercules users

ACCOUNTING - view resources used and charges
FSMESSAGE - full screen message/email system
FTP - file transfer protocol
MESSAGE - line driven email system
NET - create a network connection

Networking on MTS needed special hardware, so the messaging and network system commands will not be of much use.

Further information

There is online help for each command which you can access directly eg HELP CALC. Full documentation on how to use the commands and what command line parameters are available is available in MTS Volume 1.

In future posts I will go into more detail on some of the more complex or interesting commands.