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.
How can I turn on Text Wrap in Enterprise Guide code editor?
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.
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.
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.
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.
Now that's a fun idea, Tom. But I prefer Star Trek Ipsum for my examples.
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.