DATA Step, Macro, Functions and more

proc contents more space for Variable column

Reply
New Contributor
Posts: 3

proc contents more space for Variable column

 

 

 

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


Super User
Posts: 13,283

Re: proc contents more space for Variable column

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.

PROC Star
Posts: 2,304

Re: proc contents more space for Variable column

Works fine for me.

What code do you use?

What ODS destination?

Capture.PNG

Super User
Posts: 23,224

Re: proc contents more space for Variable column

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...
Ask a Question
Discussion stats
  • 3 replies
  • 69 views
  • 0 likes
  • 4 in conversation