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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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.

 

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
  • 5 replies
  • 991 views
  • 0 likes
  • 4 in conversation