[33m

   THE EXECUTE COMMAND[0m {See also other references in this drawer}
[33m

   COMMAND : Execute
   FORMAT  : EXECUTE <commandfile>[<arg>]
   TEMPLATE: EXECUTE commandfile,args
   DESCRIPTION :
[0m
      The EXECUTE command allows the user to execute a previously saved
   file which contains 1 or more CLI commands, comments, or directives.
   In almost all cases, EXECUTE will perform the CLI commands just as if
   the user had typed them in from the keyboard.

      Although any CLI command can be used in a command file (including
   the command EXECUTE itself), certain commands were made especially for
   use in a command file.  The following commands would be worth
   investigating:


   IF       these  allow you to test conditions occurring during  execution
   ELSE     of the sequence, and to act on the results.
   ENDIF

   FAILAT   sets the level of failure (FAILAT) at which the sequence  will
   QUIT     stop. QUIT will force a stop with a return code you choose.

   SKIP     allow  you to mark areas (LAB) in your sequence  and  then jump
   LAB      forward to them (SKIP).

   WAIT     stops  sequence  processing for  a  period of time,  or until a
            specified time of day.

   ECHO     lets you display text strings,  such  as prompts,  from  within
            your sequence.

      Flexibility has been built into the EXECUTE command in that it is
   able to accept arguments, or parameters, from the command line.  These
   parameters can be transferred to variables in the command file via
   the .KEY directive.

      Parameters are notated by enclosing the name of the parameter in
   brackets (or the current default bracket characters), except when used
   in the .KEY directive.  The $ can be used within the bracketed
   parameter to assign a specific default to this instance of the
   parameter.  See examples for more detail.

   Dot commands:

      These are used for parameter substitution.  A dot command MUST be on
   the first line of the file.  It can be any command, but is usually
   either a parameter template (.KEY) or a comment.


   [SEE FURTHER EXAMPLES BELOW]

   .K[EY] <parameter>,...
   This directive will assign arguments given in the command line to
   parameters listed here.  If no direct assignment can be made, the
   parameter is left empty, unless a default value has been assigned
   (see .DEF).  Note that the qualifier /A can be added to each parameter.
   /A after a parameter means that this parameter is required and cannot
   be omitted.  .KEY may be legally abbreviated to .K

   EXAMPLE: .KEY from_file,to_file

   .DEF <keyword> <value>
   This directive assigns a default <value> to the <keyword> given.
   Please note that defaults can be used with specific instances of a
   parameter.

   EXAMPLE:  .DEF ERROR_LEVEL "20"

   .DOT <character>
   This directive assigns <character> to replace the dot '.' throughout
   the rest of the command file.

   EXAMPLE:  .DOT @    then   @KEY from,to

   .BRA <character>
   This directive assigns <character> to replace the left bracket '<'
   throughout the rest of the command file.

   .KET <character>
   This directive assigns <character> to replace the right bracket '>'
   throughout the rest of the command file.

   EXAMPLE:  IF "<to_file>" EQ ""

   .DOLLAR <character>
   This directive assigns <character> to replace the dollar sign '$'
   throughout the rest of the command file.  May be abbreviated to .DOL .

   .<space|newline>[<text>]
   This directive is a way of commenting the command file.  .<space><text>
   is an actual comment line with text, and .<newline> is a blank comment
   line.
[33m
   FURTHER EXAMPLES
[0m
   .KEY opt1,opt2,opt3
    will try to assign arguments from the command line to the
    parameters:
             <opt1>, <opt2>, <opt3>.

   .DOT #
    assigns the meaning of the dot character to the #
    character, such that now a command like:

             #DEF new old

    is valid.  Dot no longer has the special meaning.

   .BRA {
    assigns the meaning of the left bracket to the {
    character.

   .KET }
    assigns the meaning of the right bracket to the }
    character.

   .DOLLAR *
    assigns the meaning of the dollar sign to the * character.

   .DEF opt1 FIRST.BAS
    assigns the default value of FIRST.BAS to the <opt1>.



[33m
   FURTHER NOTES
[0m
   Comments can be put into a command file by two methods.
   Placing a semicolon at the beginning of the line indicates
   a comment line, and the directive .<space> also denotes a
   comment line.

   To halt a currently executing command file, use CTRL-D.
   To halt a command file which is nested (ie, which is run from within
   another Batch File), use CTRL-C.


   EXAMPLE :

   EXECUTE ramcopy
    Will execute the command file ramcopy.

   EXECUTE ramcopy ram:
    Will execute the command file ramcopy with the required arguments ram:


   The  following sequence is used to delete a file,  but make a
   backup first in the :T subdirectory.

   . Delete a file, but make a backup first
   .
   .KEY from,to
   IF "<from>" EQ ""
      QUIT 20
   ENDIF
   IF "<to>" EQ ""
      COPY <from> TO :T/<from>.Old
      DELETE <from>
      QUIT
   ENDIF
   COPY <from> TO :T/<to>
   DELETE <from>
   QUIT



   . This example uses branching (SKIP, LAB) and default parameters.
   .
   . KEY parm1,parm2,parm3
       IF "<parm1>" EQ ""
           SKIP test
       ENDIF
       SKIP <parm2$Test>
   .DEF parm3 Instructions
   LAB Test
   . This will type the Instructions file.
       TYPE <parm3>
       QUIT
   LAB 1
       RENAME <parm1> TO <parm3>.New
       QUIT
[32m
  ####################### END OF EXECUTE ################################

