MAINSAIL Utilities User's Guide, Chapter 33

previous   next   top   contents   index   framed top   this page unframed


33. SUBCMD, Subcommand Processor

Command line syntax: subcmd {oneSubcommand}

The MODULE SUBCMD allows you to give any MAINEX subcommand. When invoked with a command line argument, the argument is interpreted as a single MAINEX subcommand.

SUBCMD is most useful when run from MAINEDIT or MAINDEBUG or from the Error response prompt.

33.1. SUBCMD Example

When the MODULE SUBCMD is invoked with no arguments, it reads subcommands from logFile. When logFile is TTY, the subcommand prompt (>) is issued and subcommand mode is entered. Any number of subcommands may be entered at this point. Subcommand mode is exited when <eol> is typed in response to the > prompt.

Example 33–1 shows the use of SUBCMD when subcommands are entered through TTY from MAINED, the MAINSAIL text editor front end. Since <eol> is given as the name of the file that contains the subcommands, subcommand mode is entered and subcommands are read from primary input. When all of the desired subcommands have been given, <eol> is typed to exit subcommand mode. At this point, the MODULE SUBCMD is exited and you are back in command mode.

Example 33–1. SUBCMD Example with Subcommands Entered from TTY Using MAINED
The MAINED command QESUBCMD<eol> is given.

-
MAINED--1.1---------I----CMDLOG-------------------
:
:
Enter subcommands (? for help).
:>
enter foo realFileName<eol>
:>
<eol>
:
E
E

If it is desired to read subcommands from a file, the subcommand SUBCOMMANDS may be used.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Utilities User's Guide, Chapter 33