The halt and trace functions raise a Rexx HALT condition or change the Rexx interactive debug mode while a Rexx procedure is running. You might prefer these interfaces to the RXHLT and RXTRC system exits. The system exits require an additional call to an exit routine after each Rexx instruction completes, possibly causing a noticeable performance degradation. The Halt and Trace functions, on the contrary, are a single request to change the halt or trace state and do not degrade the Rexx procedure performance.
The Halt and Trace functions are:
RexxSetHalt raises a HALT condition in a running Rexx program.
retc = RexxSetHalt(ProcessId, ThreadId);
is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.
is the thread ID of the target Rexx procedure. ThreadId is the application thread that called the RexxStart function. If ThreadId=0, all the threads of the process are canceled.
This call is not processed if the target Rexx program is running with the RXHLT exit enabled.
RexxSetTrace turns on the interactive debug mode for a Rexx procedure.
retc = RexxSetTrace(ProcessId, ThreadId);
is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.
is the thread ID of the target Rexx procedure. ThreadId is the application thread that called the RexxStart function. If ThreadId=0, all the threads of the process are traced.
A RexxSetTrace call is not processed if the Rexx procedure is using the RXTRC exit.
RexxResetTrace turns off the interactive debug mode for a Rexx procedure.
retc = RexxResetTrace(ProcessId,ThreadId);
is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.
is the thread ID of the target Rexx procedure. ThreadId is the application thread that called the RexxStart function. If ThreadId=0, the trace of all threads of the process is reset.
A RexxResetTrace call is not processed if the Rexx procedure uses the RXTRC exit.
Interactive debugging is not turned off unless the interactive debug mode was originally started with RexxSetTrace.