SYSTEM

SYSTEM provides interaction with the operating system without having to terminate the interactive session or batch job. If you are using a multitasking windowing system, such as Windows, you can do the same thing just by switching between windows.

SYSTEM ['command string'];

Usage

In batch mode, the SYSTEM command will execute the command you give in quotes. This may be useful for deleting files or running a program that processes files you have created with your TSP job. Note that you may have to explicitly CLOSE files before you can manipulate them with SYSTEM commands.

In interactive mode, SYSTEM usually takes no arguments, and simply produces the message

Enter system commands. Type EXIT or CONTINUE to resume TSP session.

$ (or some other system prompt)

when you have the system prompt, you may create or modify files, send MAIL to a friend, or most anything you usually do. You may keep entering commands as long as you like.

$ EXIT

will resume your interactive session where you left off with no loss of continuity. There are many uses for this feature, one of the most apparent being the ability to examine output files created during your session without halting the program. Please note that in order to use it in this way, the file must be closed first with either the TERM or OUTPUT command.

Technical note for VAX/VMS (and some other operating systems):

You may find that a few VMS commands you use don't seem to work: one example is the SET DEFAULT command to change the current directory. The reason is that although it appears that you are issuing commands directly to VMS, this is not actually so. You are still running TSP. TSP prints the "$" and reads the command you type; the command is then passed to VMS as a spawned subprocess. There are things that the subprocess will not be allowed to do, such as modify things about the environment within which the parent process (TSP) is executing.

This "flaw" can actually be a blessing in disguise: after giving the SYSTEM command, it is easy to get distracted by other tasks on the computer, and forget that you are still running TSP! Sometimes it takes something like the SET DEFAULT command ("why doesn't this thing WORK??") to remind you of unfinished business with TSP. At any rate, typing CONTINUE will quickly tell you if this is the source of your problems.