EasyManua.ls Logo

IBM TSO/E REXX

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Tracing Results
To trace only the final result of an expression, use the TRACE R (TRACE Results)
form of the TRACE instruction. All expressions that follow the instruction are
analyzed and the results are displayed as:
>>> Final result of an expression
If you changed the TRACE instruction operand in the previous example from an I to
an R, you would see the following results.
9*-*IFx+1>5*y
>>> "0"
In addition to tracing operations and results, the TRACE instruction offers other
types of tracing. For information about the other types of tracing with the TRACE
instruction, see z/OS TSO/E REXX Reference.
Exercises - Using the TRACE Instruction
Write an exec with a complex expression, such as:
IF(A>B)|(C<2*D)THEN ...
Define A, B, C, and D in the exec and use the TRACE I instruction.
ANSWER
Possible Solution
/****************************** REXX *******************************/
/* This exec uses the TRACE instruction to show how an expression */
/* is evaluated, operation by operation. */
/*******************************************************************/
A=1
B=2
C=3
D=4
TRACE I
IF(A>B)|(C<2*D)THEN
SAY 'At least one expression was true.'
ELSE
SAY 'Neither expression was true.'
When this exec is run, you see the following:
Tracing Expressions with the TRACE Instruction
38
z/OS V1R1.0 TSO/E REXX Users Guide

Table of Contents

Related product manuals