WATCH

Suspends execution when the value of a specified variable changes.
Category: Manipulating Debugging Requests
Alias: W

Syntax

WATCH variable(s)

Required Argument

variable(s)
specifies one or more DATA step variables.

Details

The WATCH command specifies a variable to monitor and suspends program execution when its value changes.
Each time the value of a watched variable changes, the debugger does the following:
  • suspends execution
  • displays the line number where execution has been suspended
  • displays the variable's old value
  • displays the variable's new value
  • returns control to the user and displays the > prompt.

Example

  • Monitor the variable DIVISOR for value changes:
    w divisor