<?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 get number of non-missing without running the entire frequency in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164044#M42550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, how does this produce a table? I'm also trying to save the value from running nlevels so I can merge it in with other data. I just need the one count variable produced with nlevels, but when I try to save the output it saves the underlying individual level data, not the nlevels value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2015 20:42:56 GMT</pubDate>
    <dc:creator>sarak</dc:creator>
    <dc:date>2015-08-24T20:42:56Z</dc:date>
    <item>
      <title>How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164033#M42539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS friends, &lt;/P&gt;&lt;P&gt;is there a way to run a frequency on a variable without displaying every level for that variable? For example i have a variable called Phone for which i have 1M observations. I don't want to know the number of occurrences of phone i just want to know if its missing. If i run the normal proc freq with the missing option it takes 20+minutes to get results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running SAS 9.4 with STAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data BigDS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i = 1 to 1000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PhoneNums=INT((RanUni(07022014)*10000000000));&lt;/P&gt;&lt;P&gt;&amp;nbsp; MissRate=RanUni(1234);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if MissRate&amp;gt;=.8 then call missing(PhoneNums);&lt;/P&gt;&lt;P&gt;&amp;nbsp; keep PhoneNums;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data = BigDS;&lt;/P&gt;&lt;P&gt;&amp;nbsp; table PhoneNums/missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164033#M42539</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2014-07-02T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164034#M42540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do a proc sort with nodupkey.&amp;nbsp; Or alternatively use:&lt;BR /&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table WANT as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HAVE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHONENUMS is null;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for freq, I don't use it so don't know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 15:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164034#M42540</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-02T15:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164035#M42541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; select nmiss(phonenums) from bigds;&lt;BR /&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 15:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164035#M42541</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-07-02T15:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164036#M42542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Outside of the SQL world, there are two standard ways to accomplish this.&amp;nbsp; First, you could switch to PROC MEANS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=have n nmiss;&lt;/P&gt;&lt;P&gt;var phonenums;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The advantage here is that you can easily add many variables to the VAR statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use PROC FREQ, apply a format that groups all nonmissing values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; value present low-high='Present' other='Missing';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables phonenum / missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; format phonenum present.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only testing will tell you which is fastest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 15:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164036#M42542</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-07-02T15:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164037#M42543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Astounding is there a low-high equivalent for character variables? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 15:38:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164037#M42543</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2014-07-02T15:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164038#M42544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For character variables, the range low-high does not help because the hex code for a blank falls in the middle of the range of possible values.&amp;nbsp; Instead, this format would do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $present ' '='Missing' other='Present';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 15:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164038#M42544</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-07-02T15:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164039#M42545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your original program might also pay a penalty for creating large ODS output, depending on your settings.&amp;nbsp; If running in SAS Enterprise Guide or in SAS Display Manager with &lt;EM&gt;default&lt;/EM&gt; settings, you're creating a large HTML or SAS Report output.&amp;nbsp; The creation/transfer of that file would slow down the overall process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="5253" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; has good suggestions for how to reduce the "counting" part of the process, making it much more efficient.&amp;nbsp; But your original approach would run pretty fast if you output just a data set, and not any report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data = BigDS &lt;STRONG&gt;noprint&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; table PhoneNums/missing &lt;STRONG&gt;out=miss_count&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or optionally, to declutter the output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data = BigDS &lt;STRONG&gt;noprint&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; table PhoneNums/missing&lt;STRONG&gt; out=miss_count&lt;/STRONG&gt;(where=(PhoneNums=.));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 16:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164039#M42545</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-07-02T16:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164040#M42546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone for your input. i like asking these questions because i always learn multiple ways to accomplish something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 16:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164040#M42546</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2014-07-02T16:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164041#M42547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to know where there are ANY missing values then use the NLEVELS output from proc FREQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;freq&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = BigDS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;nlevels&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; PhoneNums / &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 20:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164041#M42547</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-02T20:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164042#M42548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom that is awesome! can you route the results of a Nlevels table to a dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 20:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164042#M42548</guid>
      <dc:creator>SAShole</dc:creator>
      <dc:date>2014-07-02T20:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164043#M42549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ODS OUTPUT.&lt;/P&gt;&lt;P&gt;But watch because if there are no missing values then the variable NMissLevels will not even be on the output dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;ods&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; nlevels=nlevels;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;ods&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;exclude&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; nlevels;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;freq&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = BigDS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;nlevels&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; PhoneNums / &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1722&amp;nbsp; data _null_; set nlevels; put (_all_) (=/); run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;TableVar=PhoneNums&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NLevels=799696&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NMissLevels=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NNonMissLevels=799695&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 22:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164043#M42549</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-02T22:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164044#M42550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, how does this produce a table? I'm also trying to save the value from running nlevels so I can merge it in with other data. I just need the one count variable produced with nlevels, but when I try to save the output it saves the underlying individual level data, not the nlevels value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 20:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164044#M42550</guid>
      <dc:creator>sarak</dc:creator>
      <dc:date>2015-08-24T20:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164045#M42551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ODS OUTPUT statement tells it to save the output that the NLEVELS option produces as a dataset.&lt;/P&gt;&lt;P&gt;The ODS EXCLUDE statement tells it to not produce any printed output for the NLEVELS option.&lt;/P&gt;&lt;P&gt;The NOPRINT option on the TABLES statement tells it not to produce any printed output for the variable frequencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So all that it produces is the dataset with the number of levels (and number of missing levels if any).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 00:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164045#M42551</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-25T00:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164046#M42552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... if you have a number of variables (NUM, CHAR, or both types), you can try the method in this paper (it uses NLEVELS)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;An Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lexjansen.com/nesug/nesug11/ds/ds12.pdf" title="http://www.lexjansen.com/nesug/nesug11/ds/ds12.pdf"&gt;http://www.lexjansen.com/nesug/nesug11/ds/ds12.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using your data step to create 3 numeric variables ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data x;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;do i = 1 to 1000000;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; Phone1=INT((RanUni(07022014)*10000000000));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; phone2 = phone1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; phone3 = phone2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if RanUni(1234)&amp;gt;=.8 then call missing(Phone1);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if RanUni(1234)&amp;gt;=.9 then call missing(Phone2);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if RanUni(1234)&amp;gt;=.4 then call missing(Phone3);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;keep Phone: ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CPU time was &amp;lt; 1 second to produce a report ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; miss&amp;nbsp;&amp;nbsp;&amp;nbsp; p_miss&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ok&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_ok&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Phone1&amp;nbsp;&amp;nbsp;&amp;nbsp; 199,849&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 800,151&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80.0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phone2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 99,747&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 900,253&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90.0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phone3&amp;nbsp;&amp;nbsp;&amp;nbsp; 600,976&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 399,024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39.9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use PROC MI to look for patterns in missing numeric data if you have two or more numeric variables (takes longer than the NLEVELS approach) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc mi data=x; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods select misspattern; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 02:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/164046#M42552</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-08-25T02:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/225651#M53957</link>
      <description>&lt;P&gt;Here's another solution.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;noprint&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp; create&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; nmiss_or_not &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; sum(missing(j)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; NMISS,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(*) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; TOTAL_ROWS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; bigds;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&amp;nbsp; quit&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2015 17:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/225651#M53957</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2015-09-15T17:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of non-missing without running the entire frequency</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/226116#M54004</link>
      <description>&lt;P&gt;I have been using the following in my autoexec file for the last 12 years or so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FORMAT /*LIB=BBBANAL.SEGFORMATS*/ ;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VALUE MISSING .="Missing" Other="Not Missing" ;&lt;BR /&gt;&amp;nbsp; VALUE $MISSING ' '="Missing" Other="Not Missing" ;&lt;/P&gt;
&lt;P&gt;RUN ;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 19:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-get-number-of-non-missing-without-running-the-entire/m-p/226116#M54004</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2015-09-17T19:16:41Z</dc:date>
    </item>
  </channel>
</rss>

