<?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 set all missing values to 0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813364#M321002</link>
    <description>&lt;P&gt;Hint: Missing values are easy to display in reports by using the options statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options missing='0';&lt;/P&gt;
&lt;P&gt;This will, until reset, display all missing values as 0 instead of . in output such as Procs Report or Print.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another is to use a custom format. And example for your variable, since it is apparently a date value might look like:&lt;/P&gt;
&lt;PRE&gt;proc format;
value mycustomdate
. = "N/A"
other = [date9.]
;
run;&lt;/PRE&gt;
&lt;P&gt;and use the Mycustomdate format instead of the current one. Use your current date format in the [ ] brackets above if using something other than date9. You can display any text you want for the missing values though I would keep it short and relevant to the dates use. The brackets coupled with the keyword Other in Proc format means all values not in another value range are displayed with the format in the brackets.&lt;/P&gt;</description>
    <pubDate>Sun, 15 May 2022 08:29:42 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-05-15T08:29:42Z</dc:date>
    <item>
      <title>How to set all missing values to 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813343#M320988</link>
      <description>&lt;P&gt;hi, I am trying to set all missing values in the last_review column to 0. I tried to use this code however I am getting a date which is 01/01/1960 when I am expecting to get the value 0. How do I change the date given to put 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;update WORK.IMPORT&lt;BR /&gt;set&lt;BR /&gt;last_review = 0&lt;BR /&gt;where&lt;BR /&gt;last_review is missing;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2022 13:48:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813343#M320988</guid>
      <dc:creator>Ngo99</dc:creator>
      <dc:date>2022-05-14T13:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set all missing values to 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813344#M320989</link>
      <description>&lt;P&gt;A value of 0 in a variable used to store dates will result in 1960-01-01, as that is day zero on the SAS date scale.&lt;/P&gt;
&lt;P&gt;"Unknown" must be stored as a missing value.&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2022 13:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813344#M320989</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-14T13:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to set all missing values to 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813346#M320990</link>
      <description>&lt;P&gt;Good advice from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing missing values to an actual number (without good reason) is something to be avoided. It makes mathematical operations — such as taking an average — incorrect. And of course, usually, it is extra work that provides no benefit, something else to be avoided.&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2022 14:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813346#M320990</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-14T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to set all missing values to 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813348#M320992</link>
      <description>thank you</description>
      <pubDate>Sat, 14 May 2022 15:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813348#M320992</guid>
      <dc:creator>Ngo99</dc:creator>
      <dc:date>2022-05-14T15:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set all missing values to 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813364#M321002</link>
      <description>&lt;P&gt;Hint: Missing values are easy to display in reports by using the options statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options missing='0';&lt;/P&gt;
&lt;P&gt;This will, until reset, display all missing values as 0 instead of . in output such as Procs Report or Print.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another is to use a custom format. And example for your variable, since it is apparently a date value might look like:&lt;/P&gt;
&lt;PRE&gt;proc format;
value mycustomdate
. = "N/A"
other = [date9.]
;
run;&lt;/PRE&gt;
&lt;P&gt;and use the Mycustomdate format instead of the current one. Use your current date format in the [ ] brackets above if using something other than date9. You can display any text you want for the missing values though I would keep it short and relevant to the dates use. The brackets coupled with the keyword Other in Proc format means all values not in another value range are displayed with the format in the brackets.&lt;/P&gt;</description>
      <pubDate>Sun, 15 May 2022 08:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-all-missing-values-to-0/m-p/813364#M321002</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-15T08:29:42Z</dc:date>
    </item>
  </channel>
</rss>

