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 *-* IF x + 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
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 User’s Guide
Summary of Contents for TSO/E REXX
Page 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 2: ......
Page 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Page 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Page 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Page 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Page 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Page 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Page 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Page 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Page 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Page 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Page 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Page 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Page 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Page 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Page 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Page 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Page 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Page 241: ......