Halt and Trace Interface

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.

Halt and Trace Interface Functions

The Halt and Trace functions are:

RexxSetHalt

RexxSetHalt raises a HALT condition in a running Rexx program.

retc = RexxSetHalt(ProcessId, ThreadId);

Parameters

ProcessId (process_id_t) - input

is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.

ThreadId (thread_id_t) - input

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.

Return Codes

RXARI_OK 0The function completed successfully.
RXARI_NOT_FOUND 1The target Rexx procedure was not found.
RXARI_PROCESSING_ERROR 2A failure in Rexx processing occurred.

Remarks

This call is not processed if the target Rexx program is running with the RXHLT exit enabled.

RexxSetTrace

RexxSetTrace turns on the interactive debug mode for a Rexx procedure.

retc = RexxSetTrace(ProcessId, ThreadId);

Parameters

ProcessId (process_id_t) - input

is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.

ThreadId (thread_id_t) - input

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.

Return Codes

RXARI_OK 0The function completed successfully.
RXARI_NOT_FOUND 1The target Rexx procedure was not found.
RXARI_PROCESSING_ERROR 2A failure in Rexx processing occurred.

Remarks

A RexxSetTrace call is not processed if the Rexx procedure is using the RXTRC exit.

RexxResetTrace

RexxResetTrace turns off the interactive debug mode for a Rexx procedure.

retc = RexxResetTrace(ProcessId,ThreadId);

Parameters

ProcessId (process_id_t) - input

is the process ID of the target Rexx procedure. ProcessId is the application process that called the RexxStart function.

ThreadId (thread_id_t) - input

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.

Return Codes

RXARI_OK 0The function completed successfully.
RXARI_NOT_FOUND 1The target Rexx procedure was not found.
RXARI_PROCESSING_ERROR 2A failure in Rexx processing occurred.

Remarks

  • 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.