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

I feel dumb asking this and I warn you I am new to SAS.  My column name in the output window is displayed in multiple lines

example:  Percent_

               Increase

How do I make my program format it so that the column name is all in one line like this: Percent_Increase. I would like to do this for all my column names eventually.

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Exactly.

What you should do is set up labels so that your data looks appropriate ie Percent_Increase = Percent Increase or % Increase

View solution in original post

6 REPLIES 6
Reeza
Super User

What are you using the output in the window for?

You should always output to some other destination (RTF, PDF, HTML) and use that instead...in my opinion.

PhatRam33
Fluorite | Level 6

Well right now just to view the data but will eventually export to an excel file.. I suppose it won't matter then because I am assuming it will place the column header all in one line?

Right now I am using a proc print procedure to display my data.

Reeza
Super User

Exactly.

What you should do is set up labels so that your data looks appropriate ie Percent_Increase = Percent Increase or % Increase

ballardw
Super User

Also for proc print you can explicitly control the output column widths in ODS destinations (not the output widow).

Example:

proc print data=mydataset noobs label;

var firstvar / style=[cellwidth= 1.2in];

var secondvar / style=[cellwidth= .75in];

/*etc*/

run;

And make the cell widths either long enough for you labels to fit one row or to wrap comfortably.

VD
Calcite | Level 5 VD
Calcite | Level 5

Yes it should display correctly once you export it to Excel. It is appearing on two lines now just to preserve the output window space.

PhatRam33
Fluorite | Level 6

Thank you everyone for the help. This is perfect =).

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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