BookmarkSubscribeRSS Feed
mnflower
Calcite | Level 5

 

 

 

How do I set the number of columns in the Variable column so my variable names are not split into 2 lines like they are in example 2.

 

Example 1          -----Variables Ordered by Position-----
  # Variable                Type Len Format    Label
---------------------------------------------------------
174 prepare_food_other      Num    3           majority

 

Example 2          -----Variables Ordered by Position-----
  # Variable          Type Len Format    Label
---------------------------------------------------------
174 prepare_food_     Num    8 YN22FMT.  majority
    other


3 REPLIES 3
ballardw
Super User

Are you talking about the default table produced by Proc Contents? If you really want to control the appearance of output the easiest way would be to send the output to a data set and then use Proc Print with all the controls available there.

 

Proc Contents data=sashelp.class out=work.classcontents;

run;

 

proc print data=work.classcontents;

run;

 

Otherwise the approach would be to modify the template that Proc Contents uses to display results.

ChrisNZ
Tourmaline | Level 20

Works fine for me.

What code do you use?

What ODS destination?

Capture.PNG

Reeza
Super User
Your output looks like listing, so try changing the line size.

options linesize=max;

http://support.sas.com/documentation/cdl/en/hostwin/69955/HTML/default/viewer.htm#n1e2w0wxgq9vn3n1h1...

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
  • 3 replies
  • 640 views
  • 0 likes
  • 4 in conversation