<?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: problems with proc tabulate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762247#M241320</link>
    <description>I agree. And while the syntax as valid, and while the listing output is correct, the defect is archived and will not be corrected for this reason: the syntax is atypical, and the common syntax works as expected. &lt;BR /&gt;</description>
    <pubDate>Wed, 18 Aug 2021 10:53:24 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-08-18T10:53:24Z</dc:date>
    <item>
      <title>problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761381#M240927</link>
      <description>&lt;P&gt;Hello! I'm trying to reproduce a table with some dimension and percentulals, but I've a problem with visualization; I post a sample code and the part o the result that I see; could anybody help me?&lt;/P&gt;&lt;P&gt;example data and code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t;input pat1 pat2 pat3 pat4 pat5 pat6 pat7 genere $ periodo $ cl_eta $ stato $;cards;
0 0 1 0 1 0 1 M periodo1 classe1 stato1
0 0 1 0 1 0 1 M periodo1 classe3 stato2
0 0 1 0 0 0 1 F periodo1 classe1 stato3
1 0 1 0 1 0 0 F periodo1 classe2 stato1
0 0 1 0 1 0 1 M periodo1 classe1 stato1
0 0 1 0 1 0 1 M periodo1 classe2 stato1
0 0 1 0 0 0 1 F periodo1 classe1 stato3
0 0 1 0 1 0 1 M periodo2 classe3 stato3
0 1 1 0 1 0 0 F periodo2 classe1 stato3
0 0 1 0 1 0 1 F periodo2 classe1 stato2
0 0 1 0 1 0 1 M periodo2 classe1 stato2
0 0 1 0 1 0 1 M periodo1 classe4 stato2
1 0 0 0 1 0 1 M periodo1 classe1 stato2
0 0 1 0 1 0 1 F periodo2 classe1 stato2
0 0 0 0 1 0 1 M periodo2 classe1 stato2
0 0 0 0 1 0 1 F periodo1 classe1 stato3
0 0 1 0 1 0 1 M periodo1 classe1 stato3
0 0 1 0 1 0 1 M periodo1 classe1 stato3
0 0 0 0 1 0 0 F periodo1 classe1 stato3
0 0 1 0 1 0 1 M periodo1 classe5 stato1
0 0 1 0 1 0 1 F periodo1 classe1 stato1
0 1 1 0 1 0 1 M periodo1 classe2 stato1
0 1 1 0 1 0 1 F periodo1 classe1 stato1
0 0 1 0 1 0 1 M periodo2 classe3 stato3
0 0 1 0 1 0 1 M periodo2 classe3 stato3
0 0 1 0 1 0 1 M periodo3 classe3 stato2
0 0 1 0 1 0 1 F periodo3 classe3 stato2
0 0 1 0 1 0 1 M periodo2 classe3 stato3
0 0 1 0 1 0 1 F periodo2 classe3 stato1
;
proc tabulate data=t; class periodo genere cl_eta stato;var pat1-pat7;
table periodo, cl_eta='Classe di età' *
(pat1*rowpctsum*f=8.2 pat2*rowpctsum*f=8.2 pat3*rowpctsum*f=8.2 pat4*rowpctsum*f=8.2 pat5*rowpctsum*f=8.2 
pat6*rowpctsum*f=8.2 pat7*rowpctsum*f=8.2) *genere=' ', (stato=' ' all='totale'); keylabel rowpctsum=' ';
run;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; In the result it is possible see that the variable "GENERE" is not aligned across all the rows of the table.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 10:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761381#M240927</guid>
      <dc:creator>monicluder</dc:creator>
      <dc:date>2021-08-13T10:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761382#M240928</link>
      <description>&lt;P&gt;Do you use ODS PDF? Please provide your whole code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 10:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761382#M240928</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-13T10:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761383#M240929</link>
      <description>No I don't use ODS PDF, I only use the print commando on the result window. I've posted all my code</description>
      <pubDate>Fri, 13 Aug 2021 10:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761383#M240929</guid>
      <dc:creator>monicluder</dc:creator>
      <dc:date>2021-08-13T10:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761487#M240980</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/342103"&gt;@monicluder&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can confirm that my SAS 9.4M5 produces the same corrupt table layout in HTML, whereas the listing output looks right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, here is the last page:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HTML_vs_Listing.png" style="width: 919px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62563i47350ACE3A659247/image-size/large?v=v2&amp;amp;px=999" role="button" title="HTML_vs_Listing.png" alt="HTML_vs_Listing.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The HTML code created by SAS looks suspicious to me because the &lt;FONT face="courier new,courier"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt; tags are not balanced: 109 vs. 106 overall.&amp;nbsp;(But I'm not an HTML expert.)&lt;/P&gt;
&lt;P&gt;Example (part of the code for the table shown above)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;tr&amp;gt;
&amp;lt;th class="l t rowheader" rowspan="14" scope="rowgroup"&amp;gt;classe3 &amp;lt;/th&amp;gt;
&amp;lt;th class="l t rowheader" rowspan="2" scope="rowgroup"&amp;gt;pat1&amp;lt;/th&amp;gt;
&amp;lt;th class="c rowheader" rowspan="2" scope="rowgroup"&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;
&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;
&amp;lt;th class="l t rowheader" scope="row"&amp;gt;F       &amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th class="l t rowheader" scope="row"&amp;gt;M       &amp;lt;/th&amp;gt;
&amp;lt;td class="r b data"&amp;gt;.&amp;lt;/td&amp;gt;
&amp;lt;td class="r b data"&amp;gt;.&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;&lt;/PRE&gt;
&lt;P&gt;I haven't tried other ODS destinations. A similar issue with the PDF destination was mentioned in &lt;A href="https://communities.sas.com/t5/Graphics-Programming/ODSDEST-PDF-Formatting-Bug-Workarounds/m-p/215321/highlight/true#M8034" target="_blank" rel="noopener"&gt;this 2015 post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If using ODS Listing is not an option and nobody else has a better idea&lt;SPAN&gt;, you might need to open a track with &lt;A href="https://support.sas.com/en/technical-support.html" target="_blank" rel="noopener"&gt;SAS Technical Support&lt;/A&gt;.&amp;nbsp;Sorry I couldn't be of more help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 19:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761487#M240980</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-13T19:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761490#M240982</link>
      <description>&lt;P&gt;Try this and see if it is acceptable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=t; 
   class periodo  cl_eta stato;
   class genere  ;
    var pat1-pat7;
   table periodo, 
         cl_eta=' ' * (pat1-pat7)*genere=' '*rowpctsum*f=8.2 , 
        stato=' ' all='totale'
       / row=float box="Classe di età"; 
keylabel rowpctsum=' ';
run; &lt;/PRE&gt;
&lt;P&gt;I think the issue is the mix of suppressed and unsuppressed column headers though not sure why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally for my report I would be strongly tempted to have formats for Genere and Stato and use Preloadfmt so the row/columns are tad more consistent.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 19:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761490#M240982</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-13T19:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761591#M241013</link>
      <description>&lt;P&gt;Thanks Ballardw, I'm agree with you. The first idea was about a bug, and it's indeed an abnormal result on my output report! Writing the code in the mode that you suggest, it's works!&lt;BR /&gt;Bye&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 17:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761591#M241013</guid>
      <dc:creator>monicluder</dc:creator>
      <dc:date>2021-08-14T17:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761648#M241042</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/342103"&gt;@monicluder&lt;/a&gt;&amp;nbsp;This looks like a defect. You should report it to SAS Tech support.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 06:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761648#M241042</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-15T06:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761725#M241070</link>
      <description>&lt;P&gt;I reduced the code size and opened an incident with SAS.&lt;/P&gt;
&lt;P&gt;Rogue &lt;FONT face="courier new,courier"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt; tags are inserted.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 03:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/761725#M241070</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-16T03:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762017#M241212</link>
      <description>Thanks Chris! I'm in low wifi area, now, and it's difficult for me communucating with my italian sas representative</description>
      <pubDate>Tue, 17 Aug 2021 10:59:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762017#M241212</guid>
      <dc:creator>monicluder</dc:creator>
      <dc:date>2021-08-17T10:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762246#M241319</link>
      <description>&lt;P&gt;TABULATE likes for analysis variables to follow class variables in TABLE statement dimension expressions.&amp;nbsp; This worked for me:&lt;/P&gt;
&lt;P&gt;proc tabulate data=t; class periodo genere cl_eta stato;var pat1-pat7;&lt;BR /&gt;table periodo, cl_eta='Classe di età' *genere=' '&lt;BR /&gt;*(pat1 pat2 pat3 pat4 pat5 pat6 pat7), (stato=' ' all='totale')*rowpctsum*f=8.2;&lt;BR /&gt;keylabel rowpctsum=' ';&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 10:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762246#M241319</guid>
      <dc:creator>DavidK_SAS</dc:creator>
      <dc:date>2021-08-18T10:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: problems with proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762247#M241320</link>
      <description>I agree. And while the syntax as valid, and while the listing output is correct, the defect is archived and will not be corrected for this reason: the syntax is atypical, and the common syntax works as expected. &lt;BR /&gt;</description>
      <pubDate>Wed, 18 Aug 2021 10:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-proc-tabulate/m-p/762247#M241320</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-18T10:53:24Z</dc:date>
    </item>
  </channel>
</rss>

