MODE (command)

From NDWiki
Jump to navigation Jump to search
@MODE <input file>, <output file>

Substitute the input from keyboard by a set of commands in a file.

<input file>
@MODE file containing commands.
<output file>
(default = own terminal) destination of the output normally made to TERMINAL. If the command is included in another @MODE file or batch job, default output is the <output file> of the calling @MODE files.


  1. Permitted for all users.
  2. All commands are legal in a @MODE file but certain rules apply:
    1. The first character of a command line must be the "@", which corresponds to the herald character typed by the system in front of commands in direct mode. This applies to SINTRAN commands, MAIL system subcommands and SINTRAN-SERVICE-PROGRAM subcommands. Commands to other subsystems such as the editor or loader must not be preceded by the herald character or any other character.
    2. All command parameters must be specified, either on the same line as the command itself or on subsequent lines, because the system cannot ask for missing parameters. Default parameters apply as usual.
    3. All commands are legal, although some are not very well suited within a @MODE file.
    4. A @MODE file is terminated by an escape (in QED this is typed as CTRL/V and "escape") or by end-of-file.
    5. A @MODE command is permitted within a @MODE file or batch job.
    6. User's input data may be interspersed with command lines in the same way as if they were typed from the terminal.
  3. The MODE input and output files will be assigned SINTRAN file numbers starting with the first available file number (normally 101 octal). These file number will therefore not be available to user programs within the MODE file.
  4. The execution of the file will continue running under the user currently logged on the terminal from where the initial @MODE command was issued.
  5. If the user program reads or writes data on device unit number 1 (file name: TERMINAL), such data will be taken from the <input file> and written on the <output file>.
  6. Should an error condition occur within a @MODE job, a specific error message will be written on the <output file>, and the message ***BATCH JOB ABORTED*** will be typed on the terminal and the execution terminated.
  7. If the end of file or the "escape" character is reached on the <input file>, the control will be returned to where the @MODE command was issued.
  8. The execution may be interrupted by typing the "escape" character but may not be resumed, as all opened files will be closed. The last process initiated may be restarted by typing the @CONTINUE command.
  9. The PERFORM subprogram makes it possible to include parameters in MODE files. See Norsk Data Document ND–60.128.01 SINTRAN III REFERENCE MANUAL (printed June 1980), Appendix H for details.




@CRE-FI F-2,0


A mode file is executed. It contains a @DELETE-FILE and a @CREATE-FILE command.

Related commands



Norsk Data Document ND–60.050.06 SINTRAN III USERS GUIDE section 3.3.8

Norsk Data Document ND–60.128.01 SINTRAN III REFERENCE MANUAL (printed June 1980), pages 1-109, 1-110