<?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: Count missing values of 100+ variables in with column output in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235181#M55026</link>
    <description>&lt;P&gt;Proc FREQ has the NLEVELS option that is helpfull for this, see code sample below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards dlm="," dsd;
input
 RAWREG $
 PVPRISM $
 OVRIDE3 $
 DAYS $
;
cards;
01,0939,,408
,0943,,379
09,0029,,170
11,0948,,
,0948,,59
04,6108,,57
06,0993,,59
06,6111,,59
06,0993,,220
04,0901,,59
;

proc freq data=have nlevels;
  table _all_ / noprint;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It will create this output:&lt;/P&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX" target="_blank"&gt;&lt;/A&gt;
&lt;DIV class="c proctitle"&gt;The FREQ Procedure&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: NLevels" frame="box" rules="all" cellpadding="5" cellspacing="0"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="4" scope="colgroup"&gt;Number of Variable Levels&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Variable&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Levels&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Missing Levels&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Nonmissing Levels&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;RAWREG&lt;/TH&gt;
&lt;TD class="r data"&gt;6&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;PVPRISM&lt;/TH&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;OVRIDE3&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;DAYS&lt;/TH&gt;
&lt;TD class="r data"&gt;7&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;Bruno&lt;/DIV&gt;</description>
    <pubDate>Wed, 18 Nov 2015 07:50:44 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2015-11-18T07:50:44Z</dc:date>
    <item>
      <title>Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235075#M55007</link>
      <description>&lt;P&gt;HI!&amp;nbsp; I have a table with 100+ variables and I would like to know the easiest/ fastest way to check for missing/nonmissing values without having to run frequency count for each varaible in separate tables.&amp;nbsp; Preferably, I would like&amp;nbsp;all variables in on column with missing and nonmissing values in columns.&amp;nbsp; For example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Variable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Missing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Non_Missing&lt;/P&gt;
&lt;P&gt;RAWREG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;
&lt;P&gt;PVPRISM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;DAYS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;OVRIDE3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, I have 100+ variables, so can I use some kind of Select (*) function w/o having to type out all variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK.WANT"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;RAWREG&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;PVPRISM&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;OVRIDE3&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;DAYS&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="l data"&gt;01&lt;/TD&gt;
&lt;TD class="l data"&gt;0939&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;408&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;0943&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;379&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="l data"&gt;09&lt;/TD&gt;
&lt;TD class="l data"&gt;0029&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;170&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="l data"&gt;11&lt;/TD&gt;
&lt;TD class="l data"&gt;0948&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;0948&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;59&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="l data"&gt;04&lt;/TD&gt;
&lt;TD class="l data"&gt;6108&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;57&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;7&lt;/TH&gt;
&lt;TD class="l data"&gt;06&lt;/TD&gt;
&lt;TD class="l data"&gt;0993&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;59&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;8&lt;/TH&gt;
&lt;TD class="l data"&gt;06&lt;/TD&gt;
&lt;TD class="l data"&gt;6111&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;59&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;9&lt;/TH&gt;
&lt;TD class="l data"&gt;06&lt;/TD&gt;
&lt;TD class="l data"&gt;0993&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;220&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;10&lt;/TH&gt;
&lt;TD class="l data"&gt;04&lt;/TD&gt;
&lt;TD class="l data"&gt;0901&lt;/TD&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;59&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235075#M55007</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-17T17:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235077#M55008</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have;
     var rawreg--days;
     output out=stats n= nmiss=/autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235077#M55008</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-11-17T17:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235084#M55011</link>
      <description>I'm getting error with this code:&lt;BR /&gt;&lt;BR /&gt;ERROR: Variable RAWREG in list does not match type prescribed for this list&lt;BR /&gt;ERROR: Variable PVPRISM in list does not match type prescribed for this list&lt;BR /&gt;&lt;BR /&gt;...these error line go on for each variable in my table.  I'm not sure what this means?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235084#M55011</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-17T17:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235091#M55012</link>
      <description>&lt;P&gt;It seems I can't say this often enough: don't have tables with hundreds of variables. It just causes headache.&lt;/P&gt;
&lt;P&gt;Change your data model (e.g. by&amp;nbsp;transposing your data), then it's much easier to&amp;nbsp;analyze it.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235091#M55012</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-11-17T18:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235096#M55014</link>
      <description>&lt;P&gt;This means that you created your data set with all character variables, no numeric variables.&amp;nbsp; You have two basic choices at this point.&amp;nbsp; Either change your data, so that you actually have numeric variables.&amp;nbsp; Or, write a more complex program that will count missings and nonmissings for character variables.&amp;nbsp; As you make your choice, you might want to consider how you plan to use the data in the future ... will you actually need numeric variables in your data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point, first you make your choice.&amp;nbsp; Then the programming can begin.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235096#M55014</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-17T18:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235097#M55015</link>
      <description>&lt;P&gt;It means that your variables are character strings, not numbers as they appear. You should fix that first.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235097#M55015</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-11-17T18:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235102#M55016</link>
      <description>Did you tried this ?&lt;BR /&gt;&lt;BR /&gt;proc means data = sample n nmiss;&lt;BR /&gt;  var _numeric_;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 17 Nov 2015 18:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235102#M55016</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-17T18:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235108#M55018</link>
      <description>&lt;P&gt;Wouldn't this be sufficient to get a quick overview?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value miss
._-.z = 'Missing'
other = 'Non_Missing';

value $miss
' ' = 'Missing'
other = 'Non_Missing';
run;

proc freq data=have;
format _character_ $miss.
       _numeric_ miss.;
tables _all_ / missing;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235108#M55018</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-17T18:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235114#M55019</link>
      <description>&lt;P&gt;See the ideas, examples, and links in the article &lt;A href="http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html" target="_self"&gt;"Count the number of missing values in for each variable"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 19:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235114#M55019</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-11-17T19:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235181#M55026</link>
      <description>&lt;P&gt;Proc FREQ has the NLEVELS option that is helpfull for this, see code sample below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards dlm="," dsd;
input
 RAWREG $
 PVPRISM $
 OVRIDE3 $
 DAYS $
;
cards;
01,0939,,408
,0943,,379
09,0029,,170
11,0948,,
,0948,,59
04,6108,,57
06,0993,,59
06,6111,,59
06,0993,,220
04,0901,,59
;

proc freq data=have nlevels;
  table _all_ / noprint;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It will create this output:&lt;/P&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX" target="_blank"&gt;&lt;/A&gt;
&lt;DIV class="c proctitle"&gt;The FREQ Procedure&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: NLevels" frame="box" rules="all" cellpadding="5" cellspacing="0"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="4" scope="colgroup"&gt;Number of Variable Levels&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Variable&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Levels&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Missing Levels&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Nonmissing Levels&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;RAWREG&lt;/TH&gt;
&lt;TD class="r data"&gt;6&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;PVPRISM&lt;/TH&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;OVRIDE3&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;DAYS&lt;/TH&gt;
&lt;TD class="r data"&gt;7&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;Bruno&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Nov 2015 07:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235181#M55026</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-11-18T07:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235198#M55027</link>
      <description>&lt;P&gt;Please clarify: Are you interested in only NUMERIC variables, or do you want the tabulation for numeric and character variables?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 11:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235198#M55027</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-11-18T11:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235317#M55049</link>
      <description>Preferably bother character and numeric.  But I know that code can get a little tricky.  I can do it separate, counting character using:&lt;BR /&gt;&lt;BR /&gt;proc format;&lt;BR /&gt;value $missfmt ' '= 'Missing' other='Not Missing';&lt;BR /&gt;run;&lt;BR /&gt;proc freq data= have;&lt;BR /&gt;format _CHAR_ $missfmt.;&lt;BR /&gt;tables _char_ / missing missprint nocum nopercent;&lt;BR /&gt;by &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;But is there a way to for the output to be alphabetical in the results viewer?</description>
      <pubDate>Wed, 18 Nov 2015 17:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235317#M55049</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-18T17:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235324#M55051</link>
      <description>&lt;P&gt;Preferably bother character and numeric. But I know that code can get a little tricky. I can do it separate, counting character using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value $missfmt ' '= 'Missing' other='Not Missing';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc freq data= have;&lt;/P&gt;
&lt;P&gt;format _CHAR_ $missfmt.;&lt;/P&gt;
&lt;P&gt;tables _char_ / missing missprint nocum nopercent;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;***But is there a way to for the character sas variables to be alphabetical in the results viewer?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 17:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235324#M55051</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-18T17:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235331#M55055</link>
      <description>&lt;P&gt;Here is a solution, the _all_ adds some noise but it'll work.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;infile cards dsd;&lt;BR /&gt;input Obs &amp;nbsp;&amp;nbsp; &amp;nbsp;RAWREG$ &amp;nbsp;&amp;nbsp; &amp;nbsp;PVPRISM$ &amp;nbsp;&amp;nbsp; &amp;nbsp;OVRIDE3 &amp;nbsp;&amp;nbsp; &amp;nbsp;DAYS;&lt;BR /&gt;cards;&lt;BR /&gt;1,01,0939,,408&lt;BR /&gt;2,,0943,,379&lt;BR /&gt;3,09,0029,,170&lt;BR /&gt;4,11,0948,,&lt;BR /&gt;5,,0948,,59&lt;BR /&gt;6,04,6108,,57&lt;BR /&gt;7,06,0993,,59&lt;BR /&gt;8,06,6111,,59&lt;BR /&gt;9,06,0993,,220&lt;BR /&gt;10,04,0901,,59&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table get_max as&lt;BR /&gt;select *,max(obs) as max_obs&lt;BR /&gt;from have;&lt;BR /&gt;&lt;BR /&gt;proc transpose data=get_max out=tran;by max_obs;var _all_;&lt;BR /&gt;&lt;BR /&gt;data want (keep=Variable missing non_missing);&lt;BR /&gt;set tran(rename=(_name_ = Variable));&lt;BR /&gt;Missing=nmiss(of col: );&lt;BR /&gt;Non_Missing=max_obs - missing;&lt;/P&gt;&lt;P&gt;if variable in ('Obs','max_obs') then delete;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 18:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235331#M55055</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-18T18:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235339#M55056</link>
      <description>Hi!  Nlevels definitely works, but I data set is huge...14 Million observations and 100+ variables.  It keeps running out of memory every time I run the code.  It worked great for a smaller test data set!&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2015 18:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235339#M55056</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-18T18:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235352#M55060</link>
      <description>&lt;P&gt;The NLEVELS of Proc FREQ does not exactly do what you need. Had another go using the Hash object in the DATA Step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards dlm="," dsd;
  input
    RAWREG 
    PVPRISM $
    OVRIDE3 $
    DAYS 
  ;
cards;
01,0939,,408
,0943,,379
09,0029,,170
11,0948,,
,0948,,59
04,6108,,57
06,0993,,59
06,6111,,59
06,0993,,220
04,0901,,59
,,3,
;
data _null_;
  set have end=last;
  array _xchar{*} _character_;
  array _xnum{*} _numeric_;

  if _n_ = 1 then do;
    length 
      _colName $ 32
      _nMiss 8
      _n 8
    ;
    declare hash hmiss( ordered: "Y");
    hmiss.defineKey("_colName");
    hmiss.defineData("_colName", "_n", "_nMiss");
    hmiss.defineDone();
  end;

  do i = 1 to dim(_xchar);
    _nMiss=0;
    _n=0;
    _colName = vname( _xchar{i} );
    _rc = hmiss.find();
    _nMiss + (missing(_xchar{i}) = 1);
    _n + (missing(_xchar{i}) = 0);

    if _rc = 0 then do;
      hmiss.replace();
    end;
    else do;
      hmiss.add();
    end;
  end;

  do i = 1 to dim(_xnum);
    _nMiss=0;
    _n=0;
    _colName = vname( _xnum{i} );
    _rc = hmiss.find();
    _nMiss + (missing(_xnum{i}) = 1);
    _n + (missing(_xnum{i}) = 0);

    if _rc = 0 then do;
      hmiss.replace();
    end;
    else do;
      hmiss.add();
    end;

  end;

  if last = 1 then do;
    hmiss.output(dataset: "hashmiss");
  end;
run;

proc print data=hashmiss;
run;

proc print data=have;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 19:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235352#M55060</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-11-18T19:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235370#M55063</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;'s solution could be modified as follows to work also for character variables which do not contain "numeric" values:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Insert &lt;FONT face="courier new,courier"&gt;options missing=' ';&lt;/FONT&gt; before the PROC TRANSPOSE step.&lt;/LI&gt;
&lt;LI&gt;Replace &lt;FONT face="courier new,courier"&gt;nmiss&lt;/FONT&gt; by &lt;FONT face="courier new,courier"&gt;cmiss&lt;/FONT&gt; in the last data step.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;However, I have never tried to create a dataset with 14 million variables (as&amp;nbsp;TRAN would be).&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 19:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235370#M55063</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-18T19:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235372#M55065</link>
      <description>&lt;P&gt;The code I have works with numeic and character fields.&amp;nbsp; In the example I use both.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 19:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235372#M55065</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-18T19:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235380#M55066</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30712"&gt;@Steelers_In_DC﻿&lt;/a&gt;: Yes, you have both, but they all contain only "numeric" values, i.e. values which SAS can convert automatically into numeric values when it applies the NMISS function. If you replace one of the values by a text string, such as 'TEST', a note on "Invalid numeric data" will occur in the log and that text string will be incorrectly counted as missing (namely the missing numeric value resulting from the failed attempt to convert 'TEST' into a number).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CMISS function can handle both numeric and character values. But since the PROC TRANSPOSE step creates only character variables COL1, COL2, ..., it would count the periods &lt;FONT face="courier new,courier"&gt;'.'&lt;/FONT&gt;&amp;nbsp;from the numeric missings as non-missing (character strings). This is avoided by changing the MISSING system option as suggested. Special missing values would be counted as non-missing, though.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 20:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235380#M55066</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-18T20:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count missing values of 100+ variables in with column output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235390#M55068</link>
      <description>&lt;P&gt;Bruno, I have no idea what half your code means, but I'm runing it now.&amp;nbsp; So far no errors!&amp;nbsp; I will let you know&amp;nbsp;how it works out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 21:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-missing-values-of-100-variables-in-with-column-output/m-p/235390#M55068</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-18T21:27:11Z</dc:date>
    </item>
  </channel>
</rss>

