Recording and replaying statements

You can record and subsequently replay statements that you run. When you replay statements, you can replay them in a forward direction or a backward direction. Table 1 describes the sequence in which statements are replayed when you replay them in a forward direction or a backward direction.

Table 1. The sequence in which statements are replayed.
PLAYBACK FORWARD sequence PLAYBACK BACKWARD sequence COBOL Statements
1 9 DISPLAY "CALC Begins."
2 8 MOVE 1 TO BUFFER-PTR.
3 7 PERFORM ACCEPT-INPUT 2 TIMES.
8 2 DISPLAY "CALC Ends."
9 1 GOBACK.
    ACCEPT-INPUT.
4, 6 4, 6 ACCEPT INPUT-RECORD FROM A-INPUT-FILE
5, 7 3, 5 MOVE RECORD-HEADER TO REPROR-HEADER.

To begin recording, enter the following command:

PLAYBACK ENABLE

Statements that you run after you enter the PLAYBACK ENABLE command are recorded.

To replay the statements that you record:

  1. Enter the PLAYBACK START command.
  2. To move backward one statement, enter the STEP command.
  3. Repeat step 2 as many times as you can to replay another statement.
  4. To move forward (from the current statement to the next statement), enter the PLAYBACK FORWARD command.
  5. Enter the STEP command to replay another statement.
  6. Repeat step 5 as many times as you want to replay another statement.
  7. To move backward, enter the PLAYBACK BACKWARD command.

PLAYBACK BACKWARD and PLAYBACK FORWARD change the direction commands like STEP move in.

When you have finished replaying statements, enter the PLAYBACK STOP command. z/OS® Debugger returns you to the point at which you entered the PLAYBACK START command. You can resume normal debugging. z/OS Debugger continues to record your statements. To replay a new set of statements, begin at step 1.

When you finish recording and replaying statements, enter the following command:

PLAYBACK DISABLE

z/OS Debugger no longer records any statements and discards information that you recorded. The PLAYBACK START, PLAYBACK FORWARD, PLAYBACK BACKWARD, and PLAYBACK STOP commands are no longer available.

Refer to the following topics for more information related to the material discussed in this topic.

  • Related references
  • Description of the PLAYBACK commands in IBM® z/OS Debugger Reference and Messages