<?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: REPLACE FUNCTION in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583898#M166254</link>
    <description>&lt;P&gt;If what you're asking is how to replace missing numerical values (.) with zero, then do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID$ var1 var2 var3;
datalines;
1 . 3 4 
2 2 0 .
3 . . 3
4 . 8 .
5 5 . .
;

proc stdize data=have out=want reponly missing=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Aug 2019 13:23:59 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-08-26T13:23:59Z</dc:date>
    <item>
      <title>REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583896#M166252</link>
      <description>&lt;P&gt;HELLO, SOMEONE WOULD KNOW HOW I CAN REPLACE VALUES '.' EXISTING ON A SAS TABLE FOR 0?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 13:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583896#M166252</guid>
      <dc:creator>EloarL</dc:creator>
      <dc:date>2019-08-26T13:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583898#M166254</link>
      <description>&lt;P&gt;If what you're asking is how to replace missing numerical values (.) with zero, then do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID$ var1 var2 var3;
datalines;
1 . 3 4 
2 2 0 .
3 . . 3
4 . 8 .
5 5 . .
;

proc stdize data=have out=want reponly missing=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Aug 2019 13:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583898#M166254</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-26T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583900#M166255</link>
      <description>&lt;P&gt;Hi could you post an sample of what your dataset contains. i.e a sample input &amp;amp; sample output(requirement)&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 13:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583900#M166255</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-26T13:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583917#M166261</link>
      <description>&lt;P&gt;MY INPUT BASE CONTAINS VALUES (.) AS BELOW WITH 50 ROWS AND 754 COLUMNS. MY OUTPUT BASE WILL BE EVEN WITH VALUES (.) REPLACED BY 0. THE DOUBT IS HOW TO MAKE THIS REPLACEMENT ON ALL COLUMNS CONTAINING (.)&lt;BR /&gt;COLUMN 1 COLUMN2&amp;nbsp; COLUMN3....COLUMN754&lt;BR /&gt;INDUST&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; -0.0660&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583917#M166261</guid>
      <dc:creator>EloarL</dc:creator>
      <dc:date>2019-08-26T14:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583918#M166262</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284234"&gt;@EloarL&lt;/a&gt;&amp;nbsp; &amp;nbsp;Thank you. Did you try the solution given by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583918#M166262</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-26T14:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583923#M166263</link>
      <description>&lt;P&gt;Your Capslock seems to be stuck.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583923#M166263</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-26T14:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE FUNCTION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583944#M166271</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284234"&gt;@EloarL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;MY INPUT BASE CONTAINS VALUES (.) AS BELOW WITH 50 ROWS AND 754 COLUMNS. MY OUTPUT BASE WILL BE EVEN WITH VALUES (.) REPLACED BY 0. THE DOUBT IS HOW TO MAKE THIS REPLACEMENT ON ALL COLUMNS CONTAINING (.)&lt;BR /&gt;COLUMN 1 COLUMN2&amp;nbsp; COLUMN3....COLUMN754&lt;BR /&gt;INDUST&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; -0.0660&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please do not use all capitol letters in posts. It is hard to read and considered to be shouting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The question is do you want to actually change missing to zero for calculations OR for displaying 0 optionally instead of the default period character for missing values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to display 0 instead of missing in a report, proc print or similar output then setting the system missing option may be what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data junk;
   x=25;
   y=.;
run;
options missing='0';
proc print;
run;&lt;/PRE&gt;
&lt;P&gt;will Display the missing value for the y variable as 0.&lt;/P&gt;
&lt;P&gt;You can use any single character as the missing value as desired.&lt;/P&gt;
&lt;P&gt;It will stay in affect until you change the option with another Options missing assignment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If want to change the actual value to 0 then you will need to use data step code or other transformations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A third option would be create one or more custom formats for the variables that will display 0 instead of . for missing.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 15:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/REPLACE-FUNCTION/m-p/583944#M166271</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-26T15:11:41Z</dc:date>
    </item>
  </channel>
</rss>

