Please enable JavaScript to view this site.

A-Shell Reference

Revised and reviewed, July 2020

To submit a task:

SUBMIT ctlfile {do-params} {switches}

To kill a task:

SUBMIT /K seqno | pidno | jobno

To list tasks submitted by this job that are currently running:

SUBMIT

SUBMIT accepts the command line argument ++fspec, for which see History, below.

The A-Shell SUBMIT command is similar to the AMOS counterpart, in that it causes a new process to be launched, either now or at a specified later time, which executes commands specified in the control file. Under AMOS, this is managed by a background job called the Task Manager. Under A-Shell, there are actually three different possibilities, depending on the operating system and whether the /after and /next switches are used:  

In all cases, SUBMIT requires a control file (typically with a .ctl extension) which functions more or less just like a command or DO file—i.e. containing the commands necessary to run the job, along with any keyboard inputs. Programs running under the control of SUBMIT will automatically take their input from the control file, even if they wouldn’t normally accept input from a command file. The do file parameters are processed in the same way as the argument list to a DO file; see DO File Arguments for details. When the control file runs out of input, the process terminates. The preferred way to terminate the process is for the program to cleanly exit back to the control file, and for the control file to end, optionally with a LOGOFF command. See the SBR option SUBMIT2 for related information.

Switches

Switch

Effect

<no switches>

Display list of jobs launched or scheduled via SUBMIT.

Do file parameter

Unlike the AMOS implementation, the A-Shell version of SUBMIT allows DO file parameters to be passed to the control file (which can use the $0-$9 syntax, just like normal DO files, to represent the formal parameters). Any space-delimited tokens following the control file name and preceding the first switch (marked by a slash) will be passed to the control file as DO parameters.

/AFTER:{+}timspc

(Unix only) Causes the control file to be submitted via the Unix ‘at’ background processor, instead of as a child to the current job. (See note above about the ‘at’ processor.) The timspc argument may be specified using the form M-D-Y{,HH:MM}. The M-D-Y portion must be specified simply as zero for today. The optional {+} makes the time specification relative to now. Examples:

    /AFTER:0,23:00  (11 PM tonight)

    /AFTER:06-30-20,00:30  (12:30 AM on June 30, 2020)

    /AFTER:+1-0-0 (one month from now).

/BA buffile

Activates the auto-snapshot feature of INFLD and appends each snapshot to the specified file. The default file extension is BUF, and the default location is MEM0:[1,1] (if it exists) or the current login directory where the first snapshot occurs. Works internally by passing the –ba <buffile> switch to the child A-Shell process and by adding the |S type code to the INFDEF (default INFLD parameter) string.

/BC buffile

Same as the /BA option except creates a new snapshot buffer file (overwriting any existing one).

/CU

Will display the group for each job, if applicable. Requires A-Shell 6.4.1540 or greater, and use of group licensing.

/I "inifile"

Forces the child process to use a different A-Shell configuration file than the parent process. Note that the inifile name should be a native file specification, and must be enclosed in quotes (to prevent the slashes in the file spec from being confused with switches).

/J jobname

Functions just like the -j switch to A-Shell (allows you to give the background process a specific name). Otherwise, a name of the form TASxxx (TASAAA, TASAAB, ...). will be generated automatically.

/K seqno|
pidno|job

(Unix only) Kill a process currently running. To identify the process, you may specify either the "sequence number", the "process id (pid) number", or the job name (which you can get by using the SUBMIT display mode, with no arguments). Note that unless you are the superuser, you may not be able to kill any background processes other than those that you have launched.

/L logfile

(Unix only) Overrides the default log file name. (Specify an AMOS-type filename.)

/LIST:fspec

Output the list of jobs launched or scheduled via SUBMIT to the specified file.

/W: #

(Unix only) Wait # minutes for the submitted process to complete, then kill it. If # is omitted, the submitter will wait indefinitely. This may seem to defeat the purpose of running a process in background, but can be useful either when the main objective is to look at the LOG file, or when you want to run processes that otherwise would not accept input from a command file. Note that the minutes argument was added in SUBMIT version 3.1(143) of 05 June 2006, A-Shell build 957.

/NEXT:timspc

(Unix only) Equivalent to /AFTER:+timspc.

/?

Writes switch listing and usage info to the screen.

 

Comments

Note that there are a number of differences between SUBMIT.LIT under A-Shell and submitting a task to the AMOS Task Manager. First, with SUBMIT.LIT, there is no task manager; instead, the process runs as a child to your current process. Second, there is no queue; the task starts executing immediately (and there is no particular limit to how many tasks you can submit this way with overlapping execution). Third, none of the AMOS embedded control file directives (which contain the $ symbol) are supported under A-Shell. Fourth, although you can use the SUBMIT.LIT program to check on the status of background tasks (and even kill them), under A-Shell, you can only do so for tasks which you have submitted (unless you are the Superuser).

See Also

History

2022 June, A-Shell 6.5.1717, SUBMIT2.LIT 4.0(207):  Updated to fix a very old bug which would result in the directory listing being duplicated if there were consecutive DEVICE statements for the same device—i.e. one normal DEVICE definition and one or more PPN-specific definitions.

2016 December, A-Shell 6.3.1540:  Implement /CU switch to display group.

2014 November, A-Shell 6.1.1398:  Improve granularity and therefore responsiveness of /W (wait) operation. Display wait times in hundredths of seconds.

2011 November, A-Shell 6.0.1240:  Remove the limit on the number of PPNs allowed per device.

2011 August, A-Shell 5.1.1227:  DO.LIT / MDO.LIT 2.1(124) and SUBMIT.LIT 3.1(150) now support file-based variable command line arguments using the ++fspec syntax.

Subtopics

Windows

UNIX Immediate

UNIX Via Scheduler