I liberally use headers & comments in my SAS code, however when my programs reach lengths of thousands of lines I find myself losing track of the location of procedures and macros.
Is there a way to create a "table of contents" at the top of my SAS code that lists line numbers or, better yet, contains active hyperlinks within my program?
Sadly I don't think so, that would be a great Idea though...:D
Create an Idea
The other general solution is to create multiple programs and %include them instead of having one giant program.
Thanks, that's a good idea - although I may end up with a lot of separate programs tied together by my main table of contents program. I'd have to stay on top of file organization.
Although it is not exactly what you want, when coding in the enhanced efitor (e.g. in EG) you can collapse all data and proc steps and macros to just one line. See the effect with keyboard combination
ctrl+alt +numblock - (minus key)
Reinstate with ctrl+alt (num+)
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.