<?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: Tabulate Length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255643#M48860</link>
    <description>&lt;P&gt;I’m running into a scenario where I am outputting the contents of a tabulate.&amp;nbsp; One of the columns has a length of one when I output it.&amp;nbsp; But I want it to have a length of 60 when I use a datastep.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2016 20:18:35 GMT</pubDate>
    <dc:creator>DavidPhillips2</dc:creator>
    <dc:date>2016-03-09T20:18:35Z</dc:date>
    <item>
      <title>Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255634#M48856</link>
      <description>&lt;P&gt;How can I assign a length to a column created by a tabulate statement?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 20:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255634#M48856</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2016-03-09T20:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255636#M48858</link>
      <description>&lt;P&gt;You can assign a format, I'm not sure about length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;n*var_x*&lt;STRONG&gt;f=8.1&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 20:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255636#M48858</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-09T20:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255640#M48859</link>
      <description>&lt;P&gt;By Length I am assuming you mean the width of the column displayed. If you mean number of rows, which would be another way of thinking of "length" for a column, I haven't found anything other than severe data manipulation or obnoxious macro coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends to some extent on what type of column it represents.&lt;/P&gt;
&lt;P&gt;If the variable is a Class variable then use a Classlev statement: Classlev Variablename/ style=[width=1in]; Note there are a number of units you can use, this is to create a one inch wide column. If the variable is stacked then the first (top) variable will control. Example:&lt;/P&gt;
&lt;P&gt;Table variable1 variable2, someothervariable * n;&lt;/P&gt;
&lt;P&gt;The width assigned to variable1 will usually control the width of the row header column.&lt;/P&gt;
&lt;P&gt;You can set a table wide default on the tabulate statement with the stype option.&lt;/P&gt;
&lt;P&gt;Sometimes I have had success with a width on a var statement as well: Var analysisvar / style=[width=.5in] but inconsistent depending on how I use that variable.&lt;/P&gt;
&lt;P&gt;You can specify a width for a specific statistic as well.&lt;/P&gt;
&lt;P&gt;Table variable1 variable2, someothervariable * n*{style=[width=.7in]&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 20:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255640#M48859</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-09T20:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255643#M48860</link>
      <description>&lt;P&gt;I’m running into a scenario where I am outputting the contents of a tabulate.&amp;nbsp; One of the columns has a length of one when I output it.&amp;nbsp; But I want it to have a length of 60 when I use a datastep.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 20:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255643#M48860</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2016-03-09T20:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255651#M48863</link>
      <description>&lt;P&gt;Time to provide some example data and the code you are currently using. Also the ODS destination involved. So much could be done in a datastep that details are needed. And Proc Print does allow per variable style overrides to set column widths if that might be helpful.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 20:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255651#M48863</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-09T20:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255673#M48875</link>
      <description>&lt;P&gt;If you assign the length before the SET statement, I believe it changes it in the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can modify it as necessary within the proc.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
length var $60.;
set tabulate_out;

*blah blah blah;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 21:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255673#M48875</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-09T21:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255798#M48908</link>
      <description>&lt;P&gt;I was fairly over thinking it.&amp;nbsp; I just declared the length in the datastep after.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 14:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Tabulate-Length/m-p/255798#M48908</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2016-03-10T14:45:31Z</dc:date>
    </item>
  </channel>
</rss>

