Previous: Description of the user interface
Up: Description of the user interface
Next: Access to the operating system
Previous Page: Description of the user interface
Next Page: Access to the operating system
LEXT has the facility of running commands from procedure files similar to DCL command files. These must consist of an ordered sequence of LEXT commands as they would have been entered on the command line, interspersed with control commands, which all begin with a colon.
The procedure file is invoked by typing its name on the command line. In rare cases where there might be confusion of the name of a procedure with one of the LEXT built-in commands, then the user can make it clear to the program that a PROC is desired by prefixing the name with <. The default file extension is .PROC. If the procedure file is not found in the default directory, then it is searched for in the directory pointed to by LDSS_PROC. The individual command lines are optionally echoed to the terminal depending on the state of the internal control parameter ECHO. Any necessary information not supplied within the procedure will be prompted for in the normal way.
If the procedure is interrupted, by a bad error status, Ctrl-C interrupt trap or answering NO to the OK? prompt, then it can be resumed by typing CONTINUE as a subsequent command. The only restriction on this is that no other procedure file should be run in the mean time.
A procedure can be generated using a utility started by the PROC command. This takes a file name as an argument, into which the procedure commands are to be saved. On entering this facility the prompt changes and the user types in each line of their procedure. A simpler method is to use a text editor to generate the file via EDIT or $EDIT.
The available procedure commands are:
Procedures can take arguments which are simply used to replace any instances of $<n> in the procedure, where <n> is the number of the argument in the list. For example:
LEXT - LIST 7 > MOBY dickwill execute procedure MOBY and replace all occurences in that procedure of $1 with dick. Procedures may also be nested.
An example of a procedure is shown in Appendix C.