Identifying Exit Handlers to REXX

System exit handlers must be registered with RexxRegisterExitDll or RexxRegisterExitExe. The system exit handler registration is similar to subcommand handler registration.

The REXX system exits are enabled with the RexxStart function parameter Exits. Exits is a pointer to an array of RXSYSEXIT structures. Each RXSYSEXIT structure in the array contains a REXX exit code and the address of an ASCIIZ exit handler name. The RXENDLST exit code marks the exit list end.
RXSYSEXIT data structure

typedef struct {
   PSZ             sysexit_name;       /* name of exit handler        */
   LONG            sysexit_code;       /* system exit function code   */
} RXSYSEXIT;

The REXX interpreter calls the registered exit handler named in sysexit_name for all of the sysexit_code subfunctions.


[Back: Exit Parameters]
[Next: Example]