BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
faba_calculo
Calcite | Level 5

I'm working with a simple LIBNAME statement:

 

libname epdbprd

        oracle

        user = eppuser

        pass = Coffee1820

        path = EPDBPROD

        schema = eptsprd;

 

When I hit enter after the last line's semicolon, the cursor returns to being directly under the "s" in "schema" rather than all the way back to the first space all the way to the left. And if I hit Enter again, it does the same thing.

 

Why is this happening, and what can I do to make it stop?

 

Thanks.

 

faba_calculo

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

If using SAS Enterprise Guide, visit Program->Editor Options, and select None for Indentation:

 

ind.png

In Base SAS, it's under Tools->Options->Enhanced Editor Options, the General tab.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

5 REPLIES 5
Tom
Super User Tom
Super User

Annoying isn't it?  It is trying to help you keep your code consistently indented.

 

What user interface are you typing into?  SAS/Studio? Enterprise Guide? Display Manager using the Enhanced Editor? Or the Progam Editor?

faba_calculo
Calcite | Level 5

Yes and figured, in that order.   😉

 

And I'm using the Display Manager using the Enhanced Editor.

 

Any ideas?

 

Btw, thanks for the quick response.

 

faba_calculo

ChrisHemedinger
Community Manager

If using SAS Enterprise Guide, visit Program->Editor Options, and select None for Indentation:

 

ind.png

In Base SAS, it's under Tools->Options->Enhanced Editor Options, the General tab.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
faba_calculo
Calcite | Level 5

We have a winner!

 

Man, I NEVER would have found that. Sixteen years of SASing, and I've really never explored a lot of the menus.

 

Thanks again, Chris!

 

Faba_Calculo

ballardw
Super User

As I would prefer to keep the intending working another approach is to have the ; on its own line in the left margin:

libname epdbprd 
        oracle
        user = eppuser 
        pass = Coffee1820
        path = EPDBPROD
        schema = eptsprd
;

This way you can easily align your multiple parameters (or WHEN statments, or plot options or...) but the next line will start on theleft.

 

Also you you may find that backspace will undo levels of indenting by the increment set in many places

if some condition then do;
   statment;
   if other condition do;
      statement;   /*use tab for one level of indent*/
      statement;   /*After entering this line use backspace*/
   end;            /* and the "end" aligns with the IF*/
   else do;
      statement;
      statement;
      statement;
   end;
end;

but the auto indent has to be set for that to work.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1851 views
  • 0 likes
  • 4 in conversation