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.
Exactly.
What you should do is set up labels so that your data looks appropriate ie Percent_Increase = Percent Increase or % Increase
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.
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.
Exactly.
What you should do is set up labels so that your data looks appropriate ie Percent_Increase = Percent Increase or % Increase
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.
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.
Thank you everyone for the help. This is perfect =).
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!
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.