DATA Step, Macro, Functions and more

How to create a "table of contents" within my v9.3 SAS programs?

Reply
Frequent Contributor
Posts: 81

How to create a "table of contents" within my v9.3 SAS programs?

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?

Super User
Posts: 19,865

Re: How to create a "table of contents" within my v9.3 SAS programs?

Sadly I don't think so, that would be a great Idea though...Smiley Very Happy

Create an Idea

https://communities.sas.com/community/create-idea!input.jspa?containerType=14&container=2007&content...

Super User
Posts: 19,865

Re: How to create a "table of contents" within my v9.3 SAS programs?

The other general solution is to create multiple programs and %include them instead of having one giant program. 

Frequent Contributor
Posts: 81

Re: How to create a "table of contents" within my v9.3 SAS programs?

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.

Valued Guide
Posts: 2,177

Re: How to create a "table of contents" within my v9.3 SAS programs?

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+)

Ask a Question
Discussion stats
  • 4 replies
  • 209 views
  • 2 likes
  • 3 in conversation