Trace REXX (TRCREX)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Trace REXX (TRCREX) command is used to turn the interpreter function on or off from command entry or from control language (CL) programming level.

Top

Parameters

Keyword Description Choices Notes
SET Trace option setting *RESULTS, *ALL, *COMMANDS, *ERROR, *FAILURE, *INTERMEDIATES, *LABELS, *NORMAL, *OFF Optional, Positional 1
Top

Trace option setting (SET)

Specifies the initial trace setting for the next REXX procedure that is run. This setting remains in effect unless changed through the REXX TRACE instruction.

The possible values are:

*RESULTS
All clauses are traced before processing. Tracing operates as if the TRACE ?R instruction was used from within the REXX procedure.
*ALL
All clauses are traced before processing. Tracing operates as if the TRACE ?A instruction was used from within the REXX procedure.
*COMMANDS
All host commands are traced before processing and any error return code is displayed. Tracing operates as if the TRACE ?C instruction was used from within the REXX procedure.
*ERROR
Any host command resulting in an error return code is traced after processing. Tracing operates as if the TRACE ?E instruction was used from within the REXX procedure.
*FAILURE
Any host command resulting in a failure is traced after processing together with the return code from the command. Tracing operates as if the TRACE ?F instruction was used from within the REXX procedure.
*INTERMEDIATES
All clauses are traced before processing. Intermediate results during evaluation of expressions and substituted names are also traced. Tracing operates as if the TRACE ?I instruction was used from within the REXX procedure.
*LABELS
Labels passed during processing are traced. Tracing operates as if the TRACE ?L instruction was used from within the REXX procedure.
*NORMAL
Any failing host command is traced after processing. Tracing operates as if the TRACE ?N instruction was used from within the REXX procedure. This is the default setting.
*OFF
Nothing is traced. Tracing operates as if the TRACE O instruction was used from within the REXX procedure.
Top

Examples

Example 1: Tracing Host Commands

TRCREX   SET(*COMMANDS)

This command causes all commands in by the REXX procedure to be shown before they are to be run.

Example 2: Tracing Failing Host Commands

TRCREX   SET(*NORMAL)

This command causes all commands that result in a FAILURE condition to be shown. This command shows the normal setting for the REXX tracing operation.

Top

Error messages

None

Top