<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to increase the width of a table in Proc Print in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687293#M24529</link>
    <description>&lt;P&gt;When you get errors you should copy the entire procedure or data step code with the errors and any notes from the LOG and then paste that into a code box opened on the forum with the &amp;lt;/&amp;gt; icon to preserve formatting.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;8       table sex /style=[width=full];
        -----
        180
ERROR 180-322: Statement is not valid or it is used out of
               proper order.
9    run;

NOTE: The SAS System stopped processing this step because of
      errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Which very clearly says that you do not use Table in the position you have it.&lt;/P&gt;
&lt;P&gt;Use VAR to indicate the variables to display. The style option Width should have a number and unit associated with it.&lt;/P&gt;
&lt;P&gt;One example:&lt;/P&gt;
&lt;PRE&gt;proc print data=sashelp.class;
   var sex / style =[width=4in]; 
   var age / style =[width=4in]; 
run;&lt;/PRE&gt;
&lt;P&gt;You can use PCT as percent as a unit. Placing one style option with multiple variables will likely not accomplish what you want but try it.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:57:58 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-09-28T17:57:58Z</dc:date>
    <item>
      <title>How to increase the width of a table in Proc Print</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687266#M24522</link>
      <description>&lt;P&gt;How do you increase the width of a table in proc print output&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="24.976917383083016%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%" height="29px"&gt;Number of Survey participants&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="100%" height="29px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;Number of survey participants&amp;nbsp;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=have;&lt;/P&gt;
&lt;P&gt;table survey record / style (column)=[width=Full];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I keep on getting error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687266#M24522</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2020-09-28T16:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the width of a table in Proc Print</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687293#M24529</link>
      <description>&lt;P&gt;When you get errors you should copy the entire procedure or data step code with the errors and any notes from the LOG and then paste that into a code box opened on the forum with the &amp;lt;/&amp;gt; icon to preserve formatting.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;8       table sex /style=[width=full];
        -----
        180
ERROR 180-322: Statement is not valid or it is used out of
               proper order.
9    run;

NOTE: The SAS System stopped processing this step because of
      errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Which very clearly says that you do not use Table in the position you have it.&lt;/P&gt;
&lt;P&gt;Use VAR to indicate the variables to display. The style option Width should have a number and unit associated with it.&lt;/P&gt;
&lt;P&gt;One example:&lt;/P&gt;
&lt;PRE&gt;proc print data=sashelp.class;
   var sex / style =[width=4in]; 
   var age / style =[width=4in]; 
run;&lt;/PRE&gt;
&lt;P&gt;You can use PCT as percent as a unit. Placing one style option with multiple variables will likely not accomplish what you want but try it.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687293#M24529</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-28T17:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the width of a table in Proc Print</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687301#M24531</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;. I presume that is a column name you're working with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your column name has spaces in it, it looks like PROC PRINT will chose column width based on the longest value in the column. If your column header does &lt;EM&gt;not&lt;/EM&gt; have spaces, PROC PRINT will chose column width based on the longest value&amp;nbsp;or&amp;nbsp;column header (so that nothing spills over into multiple lines).&amp;nbsp;&amp;nbsp;Here are a couple examples that should help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your column name is lengthy and has spaces, it . Try using&amp;nbsp;&lt;STRONG&gt;width=full&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have1;
    input 'long column name with spaces'n $50.;
    datalines;
    test
    ;
run;

proc print data=have1; run;
proc print data=have1 width=full; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mklangley_0-1601316307047.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49898i889AB226572B8D5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mklangley_0-1601316307047.png" alt="mklangley_0-1601316307047.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Otherwise you could remove the spaces from your column names, and then you won't have this problem:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have2;
    input long_column_name_without_spaces $50.;
    datalines;
    test
    ;
run;

proc print data=have2; run;
proc print data=have2 width=full; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mklangley_1-1601316328480.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49899iB10EF6A989D2ECFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mklangley_1-1601316328480.png" alt="mklangley_1-1601316328480.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:09:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-increase-the-width-of-a-table-in-Proc-Print/m-p/687301#M24531</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-09-28T18:09:48Z</dc:date>
    </item>
  </channel>
</rss>

