Have you ever submitted a SAS program or query only to immediately regret it? It usually happens just as you finish clicking the mouse or lift your finger from the F8 key: you realize that your program has a horrible flaw that's going to make it run for hours or drag down a database server.
You immediately wish for access to Life's undo button. When you can't find one of those, you look for a way to cancel the job before it does too much damage. If you're running in SAS Enterprise Guide, you'll find it here:
- Select View->Task Status.
- Right-click on the offending task and select Stop.
If you're running SAS Enterprise Guide 4.2 and SAS 9.2, the task should stop almost immediately. If the task contained a query that delegated work to a database, stopping the job should also free up the database process. Then you're free to correct your program or task, and try again. No one else has to know about your little mistake.
(There was a lot of work done in SAS 9.2 to make that "cancel" operation work well and return control to you immediately. There is also much more power in the hands of the SAS administrator for monitoring SAS processes.)
If you're running SAS Enterprise Guide 4.1 with SAS 9.1.3, things might not go quite so smoothly. A task that contains a fairly intense SAS program might not give up control long enough to acknowledge the Stop directive. In SAS 9.1.3, the SAS session is pretty good about obeying the Stop request at the next "step" boundary, but that is of little comfort when the offending program contains just a single PROC SQL step with a crazy query.
In this case, you might need to take more drastic measures to stop a runaway job. You can right-click on the task in the Task Status window and select End SAS Process. That's the "kill switch" on your SAS session; it will cause the SAS job to end, but it will also end your SAS process and you'll lose whatever WORK data sets you might have accumulated up until that point. Also, it's sort of up to the database server to decide that there is no longer a SAS session driving it, and that it should stop working on your abandoned job. It might gracefully clean up, or it might not. Your system admin will probably let you know if it doesn't.