Starting Interactive Tracing
You can start interactive tracing with either the ? option of the TRACE instruction or
with the TSO/E EXECUTIL TS command. When interactive tracing is initiated with
the TRACE instruction, interactive tracing is not carried over into external routines
that are called but is resumed when the routines return to the traced exec. When
interactive trace is initiated by the EXECUTIL TS command, interactive trace
continues in all external routines called unless a routine specifically ends tracing.
? Option of the TRACE Instruction: One way to start interactive tracing is to
include in an exec the TRACE instruction followed by a question mark and a trace
option. For example, TRACE ?I (TRACE ?Intermediates). The question mark must
precede the option with no blanks in between. Interactive tracing then begins for the
exec but not for external routines the exec calls.
The following example includes a TRACE ?R (TRACE ?Results) instruction to
interactively trace the result of each instruction.
Example of Interactive Trace
/********************************** REXX ***************************/
/* This exec receives as arguments the destination and the name */
/* of a data set. It then interactively traces the transmitting */
/* that data set to the destination and the returning of a message */
/* that indicates whether the transmit was successful. */
/*******************************************************************/
TRACE ?R
ARG dest dsname .
"TRANSMIT" dest "DA("dsname")"
IF RC = 0 THEN
SAY 'Transmit successful.'
ELSE
SAY 'Return code from transmit was' RC
If the arguments passed to this exec were "node1.mel" and a sequential data set
named "new.exec", the interactively traced results would be as follows with each
segment separated by a pause.
8 *-* ARG dest dsname .
>>> "NODE1.MEL"
>>> "NEW.EXEC"
>.> ""
+++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
9 *-* "TRANSMIT" dest "DA("dsname")"
>>> "TRANSMIT NODE1.MEL DA(NEW.EXEC)"
0 message and 20 data records sent as 24 records to NODE1.MEL
Transmission occurred on 05/20/1989 at 14:40:11.
10 *-* IF RC = 0
>>> "1"
*-* THEN
11 *-* SAY 'Transmit successful.'
>>> "Transmit successful."
Transmit successful.
Debugging Execs
114
z/OS V1R1.0 TSO/E REXX User’s Guide