The TRACE instruction has several options for tracing, two of them are "commands" or "c" and "error" or "e".
TRACE C
When "trace c" is specified in an exec, any command that follows is traced before it is executed, then it is executed, and the return code from the command is displayed.
For example,
/*REXX*/
trace c
"listds 'dummy.ser.ds'"
exit
This example results in the following error message.
3 *-* "listds 'dummy.ser.ds'"
>>> "listds 'dummy.ser.ds'"
DUMMY.SER.DS
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG
+++ RC(8) +++
TRACE E
When "trace e" is specified in an exec, any host command that results in a nonzero return code is traced after it executes and the return code from the command is displayed.
If an exec includes "trace e", the exec displays error messages, the line number and the command, and the return code from the command, as follows:
DUMMY.SER.DS
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG
3 *-* "listds 'dummy.ser.ds'"
+++ RC(8) +++
***
TRACE C
When "trace c" is specified in an exec, any command that follows is traced before it is executed, then it is executed, and the return code from the command is displayed.
For example,
/*REXX*/
trace c
"listds 'dummy.ser.ds'"
exit
This example results in the following error message.
3 *-* "listds 'dummy.ser.ds'"
>>> "listds 'dummy.ser.ds'"
DUMMY.SER.DS
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG
+++ RC(8) +++
TRACE E
When "trace e" is specified in an exec, any host command that results in a nonzero return code is traced after it executes and the return code from the command is displayed.
If an exec includes "trace e", the exec displays error messages, the line number and the command, and the return code from the command, as follows:
DUMMY.SER.DS
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG
3 *-* "listds 'dummy.ser.ds'"
+++ RC(8) +++
***