
SUBCOM -- An example of how to add a subcommand handler to your program
-----------------------------------------------------------------------

To run:

    subcom macroname [argstring]

A simple macro, TEST.CMD, has been provided, so just type:

    subcom test

To try it out.

This runs the TEST.CMD file.


Notes
-----

The version of the RunMacro() function in RUNMACRO.C is slightly modified
from the version in the two previous examples.  A new parameter is passed
to it:  a string to use as the default address handler.  When a REXX
program is started, the default address is usually set to the subcommand
handler that is registered by the application.  This means that the
macros written for that application do not have to explicitly code

           address foo

at the top of every file.  You can see which address handler is the
default handler using the ADDRESS() function in REXX.

The actual subcommand handler is defined in SUBCOM.C.  Pay close
attention to the comments, as they explain how results are returned
to the REXX program.

