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
If using SAS Enterprise Guide, visit Program->Editor Options, and select None for Indentation:
In Base SAS, it's under Tools->Options->Enhanced Editor Options, the General tab.
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?
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
If using SAS Enterprise Guide, visit Program->Editor Options, and select None for Indentation:
In Base SAS, it's under Tools->Options->Enhanced Editor Options, the General tab.
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
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.
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 25. Read more here about why you should contribute and what is in it for you!
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.