z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


? Option of the TRACE Instruction

z/OS TSO/E REXX User's Guide
SA32-0982-00

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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014