BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SAS-Nutzer
Fluorite | Level 6

I inherited an extensive SAS-program that uses a lot of Macro %if...%else, %do...%end etc. blocks.

 

Since it is not well formatted, it is very hard to understand what block includes what and which %end or %else belongs to which %if or %do. In most programming languages / IDEs, there is a way to click on an "if" and jump to the corresponding "else" or highlight it. Is this possible in SAS EG with macro code like %if and %else?

I already tried auto-formatting, but with limited success. Is there a way to visually highlight the corresponding %end of a %if / %do, or to click on the beginning %if of a block and jump to the corresponding %end ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Sajid01
Meteorite | Level 14

While in the SAS EG it is not possible to have what you want, but code formatting and with little effort your issue should be resolved.
You can format code in the SAS Enterprise guide using CTRL+I (OR Select EDIT in the main menu, then format code from drop down).

View solution in original post

1 REPLY 1
Sajid01
Meteorite | Level 14

While in the SAS EG it is not possible to have what you want, but code formatting and with little effort your issue should be resolved.
You can format code in the SAS Enterprise guide using CTRL+I (OR Select EDIT in the main menu, then format code from drop down).

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 386 views
  • 0 likes
  • 2 in conversation