Prev: Cluster Analysis with both characteristic and numeric variables
Next: Inline formatting: Getting text boxes on 2 separate lines to
From: Anaconda on 8 Sep 2009 14:40 Is there a command that can be given - by writing it programmatically - to stop all submitted code? I think of a similar functionality as when you click on the break button in the graphical user interface, followed by 'Cancel submitted Statements' from the Application toolbar. The use of this is typically when you have an if-then-else decision tree and if one of the conditions is true, you may want to cancel the whole program, because you have just come to a condition that should not exist because it can cause a lot of trouble for the rest of the processing of the program. - Anaconda
From: Mike Rhoads on 8 Sep 2009 16:42 Take a look at the ABORT statement with its various arguments. Mike Rhoads RhoadsM1(a)Westat.com -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Anaconda Sent: Tuesday, September 08, 2009 2:40 PM To: SAS-L(a)LISTSERV.UGA.EDU Subject: How to write code to cancel all submitted code Is there a command that can be given - by writing it programmatically - to stop all submitted code? I think of a similar functionality as when you click on the break button in the graphical user interface, followed by 'Cancel submitted Statements' from the Application toolbar. The use of this is typically when you have an if-then-else decision tree and if one of the conditions is true, you may want to cancel the whole program, because you have just come to a condition that should not exist because it can cause a lot of trouble for the rest of the processing of the program. - Anaconda
From: Nallapeta1, Kiran (GE Money, on 9 Sep 2009 06:59 Use Abort; or Abort abend; statements as per your requirement... Thanks, Kiran -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Anaconda Sent: Wednesday, September 09, 2009 12:10 AM To: SAS-L(a)LISTSERV.UGA.EDU Subject: How to write code to cancel all submitted code Is there a command that can be given - by writing it programmatically - to stop all submitted code? I think of a similar functionality as when you click on the break button in the graphical user interface, followed by 'Cancel submitted Statements' from the Application toolbar. The use of this is typically when you have an if-then-else decision tree and if one of the conditions is true, you may want to cancel the whole program, because you have just come to a condition that should not exist because it can cause a lot of trouble for the rest of the processing of the program. - Anaconda
From: Anaconda on 9 Sep 2009 08:49 The ABORT statement, either with the return or the abend argument, wasn't quite what I had in mind. The ABORT statement ends the SAS session, while my intention just was to end the submitted statements. - Anaconda
From: Paul Dorfman on 9 Sep 2009 09:25
Anaconda, If you are running in batch, data ... ; ... if condition then do ; call execute ("endsas ;") ; stop ; end ; else ... ... run ; if you want the job to stop normally without causing and abend. If you do want an abend, set option errorabend and use ABORT (followed by ABEND statement, see the docs) instead of call execute above. If you are running under DMS, either method will quite the session. To avoid it, use ABORT as indicated above, however at some point precede the DATA step with option noerrabend ; Kind regards ------------ Paul Dorfman Jax, FL ------------ On Tue, 8 Sep 2009 11:40:13 -0700, Anaconda <rune(a)FASTLANE.NO> wrote: >Is there a command that can be given - by writing it programmatically >- to stop all submitted code? I think of a similar functionality as >when you click on the break button in the graphical user interface, >followed by 'Cancel submitted Statements' from the Application >toolbar. > >The use of this is typically when you have an if-then-else decision >tree and if one of the conditions is true, you may want to cancel the >whole program, because you have just come to a condition that should >not exist because it can cause a lot of trouble for the rest of the >processing of the program. > >- Anaconda |