Usage Note 38749: Conditionally produce the tasking manager dialog box
When running SAS interactively and you want to conditionally stop a program without executing steps that follow it, you can use the DM statement to pass the WATTENTION command. This causes the same dialog box to appear as if you pressed the ! on the menu bar.
An alternative is to use the ABORT CANCEL statement, but it produces an error in the log alerting the user that this occurred.
Operating System and Release Information
Microsoft Windows 95/98
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows 2000 Server
Microsoft Windows 2000 Professional
Microsoft Windows NT Workstation
Microsoft Windows Server 2003 Datacenter Edition
Microsoft Windows Server 2003 Enterprise Edition
Microsoft Windows Server 2003 Standard Edition
Microsoft Windows XP Professional
Windows Millennium Edition (Me)
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
Using the DM statement along with the WATTENTION command produces the same effect as if the ! was activated from the menu bar or Ctrl+Break was issued.
This example demonstrates how to have the dialog box open when X=5.
x = 5;
if x = 5 then call execute('%brk');
Whenever a program is running and you want to interrupt it, you can press Ctrl+Break and the Tasking Manager dialog box gives choices of how to proceed. This can be programically produced.
Common Programming Tasks ==> Utilities Common Programming Tasks SAS Reference ==> Commands