05-17-2016 02:52 PM
I have a 1000 rows of SAS code they are around 30 data steps. if I want the SAS code stop executing only after first 10 data steps finish running. how to do that? I don't want to use 'endsas' command.
05-17-2016 03:44 PM
One common method is to define the steps that you don't want to run as being a macro. For example, after the 10 steps that you want to run, insert this line of code:
Then at the end of the program insert this line:
That will define the 20 steps that you want to skip as the contents of a macro, but the program never executes the macro so the steps never run.
05-17-2016 04:42 PM
05-17-2016 06:16 PM
Yet another way COMMENTs and %include.
Put the code that you don't want to run into a separate program file. Then put an %include statement within comments so that it doesn't run.
/* comment not to run this
end comment */
When you want to run the code in the %include the Highlight that line and submit it. But if the whole program file is run the bit in the %include won't run.