BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

If a line is too long, it does not wrap to the next line, I would like to turn on Text Wrap function if there is one.

 
 

image.png

 

How can I turn on Text Wrap in Enterprise Guide code editor?

 

 

Passed SAS Base Programming (2022 Dec)
Preparing for SAS Advanced Programming (2026)
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

The Program Editor in Enterprise Guide does not support text wrap. Many programmers do have strong opinions about how long code lines should be for readability, and of course the SAS language does not care how much code is on one line. You could have a single 32K line of code as long as you have the correct semicolon punctuation. Or you can put every keyword on a new line. (Exceptions are embedded data such as in DATALINES blocks or literal strings, where line breaks do matter.)

 

If you want to control the line length of a SAS log output (or listing, the text-based output from SAS), you can do that with SAS options LINESIZE (and PAGESIZE for page length), aliased to LS and PS. Use options ls=max; for the longest possible output lines, and options ps=max; for reducing page breaks in the log and listing output.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

The Program Editor in Enterprise Guide does not support text wrap. Many programmers do have strong opinions about how long code lines should be for readability, and of course the SAS language does not care how much code is on one line. You could have a single 32K line of code as long as you have the correct semicolon punctuation. Or you can put every keyword on a new line. (Exceptions are embedded data such as in DATALINES blocks or literal strings, where line breaks do matter.)

 

If you want to control the line length of a SAS log output (or listing, the text-based output from SAS), you can do that with SAS options LINESIZE (and PAGESIZE for page length), aliased to LS and PS. Use options ls=max; for the longest possible output lines, and options ps=max; for reducing page breaks in the log and listing output.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
PaigeMiller
Diamond | Level 26

One solution, of course, is to manually add line breaks when the line gets long and might pass the right edge of the window. I have done this in the SAS application workspace (I don't use Enterprise Guide) for the last 700 years. I don't even think about it any more, its a habit.

--
Paige Miller
Tom
Super User Tom
Super User

You could always ask SAS itself to help wrap some text (instead of the GUI tool Enterprise Guide).  

Example:

options ls=72;
data _null_;
  input word :$100. @@ ;
  file log ;
  put word @ ;
cards4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
;;;;

Now just copy the lines from the SAS log.

 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
 commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
 occaecat cupidatat non proident, sunt in culpa qui officia deserunt
 mollit anim id est laborum.
ChrisHemedinger
Community Manager

Now that's a fun idea, Tom. But I prefer Star Trek Ipsum for my examples.

 

2026-04-01_13-28-29.png

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 4 replies
  • 541 views
  • 4 likes
  • 4 in conversation