Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Updated May 2022; see History

DO <fspec> <argument list>

where <argument list> is a list of zero or more space-delimited textual tokens which are bound to the formal DO File Arguments referenced within the file identified by <fspec>.

The DO command forces fspec to be treated as a command file rather than as a system command. This is useful in situations where the fspec in question exists in .CMD and/or .LIT variations as well as .DO, since otherwise, the command search path would cause the .CMD or .LIT to be found first. It is also needed to force a file with an extension other than DO to be interpreted as a DO file—although it is not clear why you want to do that.

DO supports the command line argument ++fspec; for details see DO File Arguments.

DO.LIT is invoked automatically by the command line processor if it determines that the specified file is a command (.CMD or .DO) file, so it is not necessary to explicitly use "DO" except in the situations described above. DO.LIT is responsible for preprocessing the DO file to perform argument and macro substitutions.

MDO.LIT is identical to DO.LIT, but is referenced internally under different circumstances.

Comments

The maximum DO file size is approximately 122K. This is about the maximum size for a 430K partition, which is about the minimum partition needed for some other large system commands, such as SUBMIT. A-Shell will explicitly complain if the partition size is not sufficient.

When DO is used within a command file to reference another command file, the command line may contain references variables input during execution of the current command file, $KBD0 thru $KBD9 (see K0 - K9 Tokens), may contain upper and lower case functions (see Input Case), and may use the concentration operator $+ (see Concatenate Parameters).

History

2022 May, A-Shell 6.5.1715, DO.LIT / MDO.LIT 2.1(126):  special colon commands (e.g. :K) can now be indented. Previously they needed to be in column one. This may be a minor detail but can make all the difference in debugging complex DO files with many levels of nested IF / ENDIF clauses.

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.