BookmarkSubscribeRSS Feed
RobF
Quartz | Level 8

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?

4 REPLIES 4
Reeza
Super User

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

RobF
Quartz | Level 8

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.

Peter_C
Rhodochrosite | Level 12

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 892 views
  • 2 likes
  • 3 in conversation