MODE (command): Difference between revisions
Jump to navigation
Jump to search
(created page for the MODE command) |
m (fixed link to @CONTINUE) |
||
Line 18: | Line 18: | ||
#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. | #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. | ||
#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. | #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. | ||
#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. | #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)|CONTINUE]] command. | ||
#The [[PERFORM]] subprogram makes it possible to include parameters in MODE files. See {{ND-doc|60.128.01}} (printed June 1980), Appendix H for details. | #The [[PERFORM]] subprogram makes it possible to include parameters in MODE files. See {{ND-doc|60.128.01}} (printed June 1980), Appendix H for details. | ||
Latest revision as of 12:30, 2 October 2017
@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.
Rules:
- Permitted for all users.
- All commands are legal in a @MODE file but certain rules apply:
- 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.
- 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.
- All commands are legal, although some are not very well suited within a @MODE file.
- A @MODE file is terminated by an escape (in QED this is typed as CTRL/V and "escape") or by end-of-file.
- A @MODE command is permitted within a @MODE file or batch job.
- User's input data may be interspersed with command lines in the same way as if they were typed from the terminal.
- 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.
- The execution of the file will continue running under the user currently logged on the terminal from where the initial @MODE command was issued.
- 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>.
- 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.
- 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.
- 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.
- 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.
Example:
@MODE MF-1,
@DEL-FI F-1:DATA
@CRE-FI F-2,0
@
A mode file is executed. It contains a @DELETE-FILE and a @CREATE-FILE command.
Related commands
References
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