A tour of MTS commands
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 settingsHELP/EXPLAIN
- interactive help systemMTS
- return to MTS command mode from another programSET
- 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 filesCREATE
- create a new fileDESTROY
- remove a fileDUPLICATE
- create a duplicate of a file, making a new file if neededEDIT
- edit a fileEMPTY
- remove contents of a file or set of filesFILEMENU
- interactive selection of filesFILESTATUS
- view information about filesLIST
- display filesLOCK
- lock a fileLOCKSTATUS
- display status of locks on filesPERMIT
- grant access to filesRENAME
- rename a file or set of filesRENUMBER
- renumber a line fileTRUNCATE
- remove unused space at end of fileUNLOCK
- 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 fileSIGNOFF
- log out of the systemSIGNON
- log into the system
Run programs
RERUN
- reissue the previous RUN command, optionally changing parametersRUN
- run a programSINK
- send output to a file/deviceSOURCE
- take input from a file/device
Devices and queues
CONTROL
- operations on files and devices, eg rewind a tapeCANCEL
- stop batch or print jobsMOUNT
- mount tapesRELEASE
- stop using a pseudodevice 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 memoryDEBUG
- load a program and enter debug command modeDUMP
- print out register and CPU informationIF
- test a condition, usually for use in a batch fileLOAD
- load a program into memory but don’t execute it yetMAKE
- keep interrelated files in an consistent stateRESTART/START
- restart a program, eg after an errorSDS
- transfer control to debug modeUNLOAD
- remove a previously loaded program from memory
Other commands of less use for Hercules users
ACCOUNTING
- view resources used and chargesFSMESSAGE
- full screen message/email systemFTP
- file transfer protocolMESSAGE
- line driven email systemNET
- 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.