#define INCL_REXXSAA
#include <rexxsaa.h>
   :
PSZ szFileName;                                 /* File to be accessed   */
PSZ szOptions;                                  /* Command arguments     */
RXSTRING arg;                                   /* REXX argument string  */
RXSTRING RexxRetValue;                          /* Result                */
LONG lRexxRC;                                   /* REXX return code      */
static RXSYSEXIT ExitList[] = {{"TIXXSIO", RXSIO}, /* Exit handler       */
                               {NULL, RXENDLST}};
   :
arg.strptr = szOptions;                         /* Set argument string   */
arg.strlength = strlen(szOptions);              /* Size of arg string    */
rc = RexxStart(1,                               /* Call REXX           */
               &arg,                            /* Argument string     */
               (PSZ)"RexxProc",                 /* REXX proc file      */
               NULL,                            /* Procedure in file   */
               (PSZ)"TIXX",                     /* ADDRESS environment */
               (SHORT)RXCOMMAND,                /* REXX command        */
               (PRXSYSEXIT)ExitList,            /* Exit list routines  */
               &lRexxRC,                        /* Return code address */
               &RexxRetValue);                  /* Returned result     */
This example shows the use of the RexxStart() function to call the REXX command interpreter from within an application.