System information

1.6.7 SUBMIT Command
Syntax:
SUBMIT ufn parm#l ... parm#n
The SUBMIT command allows CP/M commands to be batched for automatic processing. The
ufn given in the SUBMIT command must be the filename of a file that exists on the currently
logged disk, with an assumed file type of SUB. The SUB file contains CP/M prototype
commands with possible parameter substitution. The actual parameters parm#1 ... parm#n are
substituted into the prototype commands, and, if no errors occur, the file of substituted
commands are processed sequentially by CP/M.
The prototype command file is created using the ED program, with interspersed $ parameters of
the form:
$1 $2 $3 ... Sn
corresponding to the number of actual parameters that will be included when the file is submitted
for execution. When the SUBMIT transient is executed, the actual parameters parm#1 ... parm#n
are paired with the formal parameters $1 ... $n in the prototype commands. If the numbers of
formal and actual parameters do not correspond, the SUBMIT function is aborted with an error
message at the console. The SUBMIT function creates a file of substituted commands with the
name
$$$.SUB
on the logged disk. When the system reboots, at the termination of the SUBMIT, this command
file is read by the CCP as a source of input rather than the console. If the SUBMIT function is
performed on any disk other than drive A, the commands are not processed until the disk is
inserted into drive A and the system reboots. You can abort command processing at any time by
pressing the rubout key when the command is read and echoed. In this case, the $$$.SUB file is
removed and the subsequent commands come from the console. Command processing is also
aborted if the CCP detects an error in any of the commands. Programs that execute under CP/M
can abort processing of command files when error conditions occur by erasing any existing
$$$.SUB file.
To introduce dollar signs into a SUBMIT file, you can type a $$ which reduces to a single $
within the command file. An up arrow, ^|, precedes an alphabetic character s, which produces a
single CTRL-X character within the file.
1.6 Transient Commands CP/M Operating System Manual
1-39