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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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