I have inherited a set of programs created by someone else. He has used the occasional horizontal line to visually separate sections of the program. This seems like a very handy tool, but I can’t figure out how to replicate it. Anyone know how it’s done?
With my version of SAS (9.1) and using the Enhanced Editor, SAS automatically denotes sections of code with a horizontal line at the end of the code. There is also an ‘-’ in a box at the beginning of the code that allows that section of code to be collapsed.
Enabling that appears to be in the Tools–>Options–>Enhanced Editor. Then on the General tab, there is a box to enable “Collapsible code sections” and “Show section lines in text.”
Just in case, you can turn this on (in 9.2) by going to Tools->Options->Enhanced Editor. Under the General tab make sure “Collapsible code sections” and “Show section lines in text” are both checked.
I don’t know why my code doesn’t do that automatically, but I’m going to look into it tomorrow, because collapsible code is very helpful. Years ago, I used a editor for the obscure language OCCAM which had a “folding” editor - every structure (if, do, etc.) could be “folded” out of the way so that higher levels of organization could be more easily seen, or unfolded to look at the details (Code folding - Wikipedia). I loved it.