<?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 Proc Freq Output not Consistent in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185381#M47076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run this statement on a dataset, I usually get 5 columns. TableVar, TableVarLabel, NLevels, NMissLevels, NNonMissLevels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods output nlevels=nlevelsds;&lt;/P&gt;&lt;P&gt;proc freq data=LIB.DATASET nlevels;&lt;/P&gt;&lt;P&gt;tables _all_/noprint;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I change the dataset to a different dataset, I only get 3 columns!&amp;nbsp;&amp;nbsp; TableVar, TableVarLabel, NLevels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why?&amp;nbsp; Would this happen if my dataset had no missing values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to force these columns to appear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The unpredictable output is really giving me problems with programming and automation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2014 17:11:10 GMT</pubDate>
    <dc:creator>JBerry</dc:creator>
    <dc:date>2014-07-18T17:11:10Z</dc:date>
    <item>
      <title>Proc Freq Output not Consistent</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185381#M47076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run this statement on a dataset, I usually get 5 columns. TableVar, TableVarLabel, NLevels, NMissLevels, NNonMissLevels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods output nlevels=nlevelsds;&lt;/P&gt;&lt;P&gt;proc freq data=LIB.DATASET nlevels;&lt;/P&gt;&lt;P&gt;tables _all_/noprint;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I change the dataset to a different dataset, I only get 3 columns!&amp;nbsp;&amp;nbsp; TableVar, TableVarLabel, NLevels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why?&amp;nbsp; Would this happen if my dataset had no missing values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to force these columns to appear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The unpredictable output is really giving me problems with programming and automation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 17:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185381#M47076</guid>
      <dc:creator>JBerry</dc:creator>
      <dc:date>2014-07-18T17:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq Output not Consistent</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185382#M47077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is happening because your second data set contains variables that don't have missing values. If at least one of the variables in your second dataset has missing values then you will get 5 columns in nlevelsds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 18:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185382#M47077</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-07-18T18:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq Output not Consistent</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185383#M47078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there no way to force a consistent output? I would like to create macros, but if one of the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This blows my mind that the output structure is dependent upon the values of the data.... because when I automate a process, it will fail if the column doesnt exist (even though it SHOULD exist, just with a 0 for missing values)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 18:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185383#M47078</guid>
      <dc:creator>JBerry</dc:creator>
      <dc:date>2014-07-18T18:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq Output not Consistent</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185384#M47079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create an empty table with all the columns expected and insert the output into it.&amp;nbsp; You'll also have to verify the variable type, character or numeric. Or use a different method entirely to generate your output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But yes, the structure doesn't appear to be static and this is common pitfall of ODS tables. For example if you do a one way table versus a two way table in proc freq the output table names are different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 19:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Freq-Output-not-Consistent/m-p/185384#M47079</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-07-18T19:06:01Z</dc:date>
    </item>
  </channel>
</rss>

