<?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: Convert Zeros to NULL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417800#M102628</link>
    <description>&lt;P&gt;One way assuming all the variables are numeric:&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   array v var1 var2 varx;   /* add variables as needed*/
   do i=1 to dim(v);
     if v[i]=0 then v[i]=.;
   end;
   drop i;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2017 18:44:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-01T18:44:39Z</dc:date>
    <item>
      <title>Convert Zeros to NULL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417795#M102626</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have a very large dataset with multiple variables. Some of these variables have a value of zero, which I'd like to convert to 'NULL'. How would I go about doing this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Eg:&lt;/P&gt;&lt;P&gt;Desciprtion, VariableA#, VariableB#.......VariableZ#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 16:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417795#M102626</guid>
      <dc:creator>JayCompany</dc:creator>
      <dc:date>2017-12-01T16:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Zeros to NULL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417797#M102627</link>
      <description>&lt;P&gt;In SAS, missing numerical values are represented by a dot. So do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if variable = 0 then variable = .;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Dec 2017 16:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417797#M102627</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-01T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Zeros to NULL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417800#M102628</link>
      <description>&lt;P&gt;One way assuming all the variables are numeric:&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   array v var1 var2 varx;   /* add variables as needed*/
   do i=1 to dim(v);
     if v[i]=0 then v[i]=.;
   end;
   drop i;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 18:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417800#M102628</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-01T18:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Zeros to NULL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417870#M102643</link>
      <description>&lt;P&gt;If the variables are numeric then try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC FORMAT;&lt;BR /&gt;value Null .="NULL";&lt;BR /&gt;run;&lt;BR /&gt;data want;&lt;BR /&gt;set Have ;&lt;/P&gt;&lt;P&gt;array Change _numeric_;&lt;BR /&gt;do over change;&lt;BR /&gt;if change&amp;gt;10 then change=.;&lt;BR /&gt;end;&lt;BR /&gt;FORMAT _NUMERIC_ Null.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 21:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-Zeros-to-NULL/m-p/417870#M102643</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2017-12-01T21:30:37Z</dc:date>
    </item>
  </channel>
</rss>

