There is still no way to stop a program from executing further statements except by killing the session by aborting it.
Many years ago I kludged together a workaround, but I reckon a proper way to stop a program without generating an error or aborting the session is needed.
Aren't you talking about what abort already does with the cancel argument?
data ...; abort cancel; run;
This still generates an error sadly.
Seems to me like a self-created problem. If you don't want the error message then write the program as a macro and either control your process flow with %if statements and labels or using %return when you want to stop processing...
Having to embed all the code in a macro is exactly why I wrote my "kludge". Sometimes, it is just too much of a pain.
Having a way to stop a program from running any further without creating an error (a big no-no in production systems) does seem a very sensible, if not obvious, feature to me.
Don't get me wrong, I think making something like the stop statement global could be useful. I just see many already existing alternatives which are due their merit here and are far less of a kludge (I found yours to be quite clever)
>many already existing alternatives
There is only one way I can think of: put all the code in a huge macro that serves no other purpose than to stop the steps it contains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.