You can use the REXX interactive trace facilities to understand what is happening in your
program.
For details about the TRACE instruction, see TRACE.
To find out where your program is going, use TRACE Labels. The example shows a program and the
trace it gives on the screen. Figure 1. ROTATE
/* ROTATE */
/* Example: two iterations of wheel, six iterations */
/* of cog. On the first three iterations, "x < 2" */
/* is true. On the next three, it is false. */
trace L
do x = 1 to 2
wheel:
do 3
cog:
if x < 2 then do
true:
end
else do
false:
end
end
end
done: