Chapter Contents |
Previous |
Next |
BREAK |
Category: | Manipulating Debugging Requests |
Alias: | B |
Syntax | |
Arguments | |
Details | |
Examples | |
See Also |
Syntax |
BREAK location <AFTER count> <WHEN expression> <DO group > |
label | a statement label. The breakpoint is set at the statement that follows the label. |
line-number | the number of a program line at which to set a breakpoint. |
* | the current line. |
If a BREAK command contains both AFTER and WHEN, AFTER is evaluated first. If the AFTER count is satisfied, the WHEN expression is evaluated.
Tip: | The AFTER option is useful in debugging DO loops. |
DO; command-1 < ... ; command-n; >END;
A DO group can span more than one line and can contain IF-THEN/ELSE statements, as shown:
IF expression THEN command; <ELSE command;>
IF expression THEN DO group; <ELSE DO group;>
IF evaluates an expression. When the condition is true, the debugger command or DO group in the THEN clause executes. An optional ELSE command gives an alternative action if the condition is not true. You can use these arguments with IF:
Details |
The BREAK command suspends execution of the DATA step at a specified statement. Executing the BREAK command is called setting a breakpoint.
When the debugger detects a breakpoint, it
If a breakpoint is set at a source line that contains more than one statement, the breakpoint applies to each statement on the source line. If a breakpoint is set at a line that contains a macro invocation, the debugger breaks at each statement generated by the macro.
Examples |
b 5
eoflabel
:
b eoflabel
b 45 after 3
b 45 after 3 when (divisor=0 and dividend=0)
b 45 do; ex name age; end;
b 15 do; if divisor>3 then st; else ex dividend; end;
See Also |
Commands:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.