<?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: Assessing Missing/Nulls in character fields in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127557#M34867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... just in case anyone was wondering!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt; value $miss " "="missing"&lt;/P&gt;&lt;P&gt; other="nomissing";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=datafile;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tables _character_ / missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format _character_ $miss.;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jul 2013 17:56:17 GMT</pubDate>
    <dc:creator>mMike5</dc:creator>
    <dc:date>2013-07-05T17:56:17Z</dc:date>
    <item>
      <title>Assessing Missing/Nulls in character fields</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127556#M34866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering whether there is an easy way to assess the no. missing/null values in a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following for numeric and string variables. Its fine for numeric variables, but the code for string variables returns a frequency table of values, if there is a lot of records and a string ID field the output can be massive. Is there a way to output a report of only the count of the number of missing values for each character variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Asess numeric variables */&lt;/P&gt;&lt;P&gt;proc means data = Datafile n nmiss;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var _numeric_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Asess categorical variables */&lt;/P&gt;&lt;P&gt;proc freq data = Datafile;&lt;/P&gt;&lt;P&gt;tables&amp;nbsp; _character_ ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 17:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127556#M34866</guid>
      <dc:creator>mMike5</dc:creator>
      <dc:date>2013-07-05T17:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Missing/Nulls in character fields</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127557#M34867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... just in case anyone was wondering!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt; value $miss " "="missing"&lt;/P&gt;&lt;P&gt; other="nomissing";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=datafile;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tables _character_ / missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format _character_ $miss.;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 17:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127557#M34867</guid>
      <dc:creator>mMike5</dc:creator>
      <dc:date>2013-07-05T17:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Missing/Nulls in character fields</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127558#M34868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;data have;
 set sashelp.class;
 if ranuni(-1) lt 0.5 then call missing(name);
 if ranuni(-1) lt 0.5 then call missing(age);
run;

proc sql;
 select cats('nmiss(',name,') as nmiss_',name) into : list separated by ','
&amp;nbsp; from dictionary.columns 
&amp;nbsp;&amp;nbsp; where libname='WORK' and memname='HAVE';

 create table want as
&amp;nbsp; select &amp;amp;list from have;
quit;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 01:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assessing-Missing-Nulls-in-character-fields/m-p/127558#M34868</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-06T01:06:55Z</dc:date>
    </item>
  </channel>
</rss>

