Does anyone else ever accidentally hit run in a program with a long code without anything selected? I've done it and seen it happen a million times. I wonder if anyone knew of a macro/option that I could put at the top of my code that would just abort anything after that command. I know stop all submitted commands in an option but I have to end up re-running my datasets most of the time so it doesn't save too much time. I'm currently just commenting out large tasks but it doesn't really address the issue.
Thanks!
This may be a kludge but if there is a data set you don't want to run unless selected:
/*
Data wanttorunamanually;
Statements
....
run;
*/
Then when you want this to run highlight those lines and submit.
Of course I may be misunderstanding the problem.
You could embed the code you don't want to execute into a macro definition. It will be visible in the log, but not executed.
I wonder if anyone knew of a macro/option that I could put at the top of my code that would just abort anything after that command.
You want a statement that can go as the first statement of your code that will prevent any code from executing if you accidentally hit run when nothing is selected. I am not aware of anything like this.
This seems like a double edged sword, because when you do want the whole set of statements to execute, you have to remove or comment out whatever is the first statement.
I prefer cancelling execution via Ctrl-Break (on Windows).
In a macro environment you can use a %goto statement to skip certain code (including as the first executable line of the macro if you want) or %if 0 %then %do; followed by an %end; statement somewhere to comment out blocks of code.
Thanks!
I guess I've never tried using control break, so I'll start there. I'll look into that macro option, but I didn't want to get too automated because the process I'm skipping is a data step which I'm refining all the time. From what both of you are saying though the macro option seems to be my best bet so far.
Thanks Again
This may be a kludge but if there is a data set you don't want to run unless selected:
/*
Data wanttorunamanually;
Statements
....
run;
*/
Then when you want this to run highlight those lines and submit.
Of course I may be misunderstanding the problem.
This is perfect! And now so obvious. Thanks
hi i am looking for someone to help me with conbrach alpha on SAS can you help me please. where is it located. i am using 9.4 enterprise. please help
Please start new threads instead of tacking on to old unrelated threads.
Cronbach's Alpha can be found with the Alpha option of Proc Corr
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: