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
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.
Works fine for me.
What code do you use?
What ODS destination?
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.