<?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: Replacing numeric missing variable value with 'NA' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389209#M93320</link>
    <description>&lt;P&gt;No, That's not how a user defined format works. Post your code if you're having issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/90394"&gt;@subrat1&lt;/a&gt; wrote:&lt;BR /&gt;Even after using user defined format .....The format of all numeric&lt;BR /&gt;variable changes....hence the data does not show correct value&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 19:20:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-08-18T19:20:57Z</dc:date>
    <item>
      <title>Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389202#M93316</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data yourdata;
   set yourdata;
   array change _numeric_;
        do over change;
            if change=. then change= NA;
        end;
 run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above sas code does not work as i am trying to replace missing&amp;nbsp;Numeric variable &amp;nbsp;value with NA&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389202#M93316</guid>
      <dc:creator>subrat1</dc:creator>
      <dc:date>2017-08-18T19:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389205#M93317</link>
      <description>&lt;P&gt;I think you would be better off using a user defined format to replace .=NA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389205#M93317</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-08-18T19:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389207#M93318</link>
      <description>&lt;P&gt;Well, a column is numeric or character and NA is a character. So you're trying to put a character in a field that expects a number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you need NA to export it to R?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you exporting, perhaps modify it there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you're trying to do overall will define how this should be approached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389207#M93318</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-18T19:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389208#M93319</link>
      <description>Even after using user defined format .....The format of all numeric&lt;BR /&gt;variable changes....hence the data does not show correct value&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389208#M93319</guid>
      <dc:creator>subrat1</dc:creator>
      <dc:date>2017-08-18T19:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389209#M93320</link>
      <description>&lt;P&gt;No, That's not how a user defined format works. Post your code if you're having issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/90394"&gt;@subrat1&lt;/a&gt; wrote:&lt;BR /&gt;Even after using user defined format .....The format of all numeric&lt;BR /&gt;variable changes....hence the data does not show correct value&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389209#M93320</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-18T19:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389230#M93327</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User defined format solves your problem. See below code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT ;
PICTURE Num    .="NA"
             OTHER="00.00";
			 run;

data test;
input  Number ;
format Number num. ;
cards;
3.3
6.8
10
.
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389230#M93327</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2017-08-18T20:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing numeric missing variable value with 'NA'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389377#M93363</link>
      <description>&lt;P&gt;Defining your own numeric format is the simplest way to replace the printed values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do x = 1, ., .a, ._, 2;
    output;
    end;
run;

proc format;
value myMiss
. = "          NA"
other = [best12.];
run;

proc datasets library=work nolist;
modify test;
format _numeric_ myMiss.;
run;

proc print data=test; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that special missing values are not affected by the custom format as defined above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 04:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-numeric-missing-variable-value-with-NA/m-p/389377#M93363</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-08-20T04:41:47Z</dc:date>
    </item>
  </channel>
</rss>

