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 ...

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.