Exit Return Codes
Exit handlers return an integer value that signals one of three actions
:
RXEXIT_HANDLED
The exit handler processed the exit
subfunction and updated the subfunction parameter list as required. The
REXX interpreter continues with processing as usual.
RXEXIT_NOT_HANDLED
The exit handler did not process the exit subfunction.
The REXX interpreter processes the subfunction as if the exit handler was
not called.
RXEXIT_RAISE_ERROR
A
fatal error occurred in the exit handler. The REXX interpreter raises REXX
error 48 ("Failure in system service").
For example, if an application creates an input/output exit handler:
- When the exit handler returns RXEXIT_NOT_HANDLED for
an RXSIOSAY subfunction, the REXX interpreter writes the output line to
STDOUT.
- When the exit handler returns RXEXIT_HANDLED for an
RXSIOSAY subfunction, the REXX interpreter assumes the exit handler has
handled all required output. The interpreter does not write the output line
to STDOUT.
- When the exit handler returns RXEXIT_RAISE_ERROR for
an RXSIOSAY subfunction, the interpreter raises REXX error 48, "Failure
in system service".
[Back: Writing System Exit Handlers]
[Next: Exit Parameters]