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 =).

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2315 views
  • 6 likes
  • 4 in conversation