<?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: word NULL in dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495450#M130757</link>
    <description>As we all know ,Null is a char value. So you can remove it using either if condition or with call missing--&lt;BR /&gt;1. data test;&lt;BR /&gt;input x1 $;&lt;BR /&gt;if X1='null' then x1='';&lt;BR /&gt;cards;&lt;BR /&gt;A1&lt;BR /&gt;null&lt;BR /&gt;A2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;2. data test;&lt;BR /&gt;input x1 $;&lt;BR /&gt;if X1='null' then call missing(x1);&lt;BR /&gt;cards;&lt;BR /&gt;A1&lt;BR /&gt;null&lt;BR /&gt;A2&lt;BR /&gt;;&lt;BR /&gt;run;</description>
    <pubDate>Thu, 13 Sep 2018 18:26:25 GMT</pubDate>
    <dc:creator>Vibcom</dc:creator>
    <dc:date>2018-09-13T18:26:25Z</dc:date>
    <item>
      <title>word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495421#M130744</link>
      <description>&lt;P&gt;I have a dataset that has the word NULL as a value and I am trying to replace it with a blank space but it doesn't work with the below IF statement. How can I overwrite/replace the word NULL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;IF TSA_CODE_1 = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'NULL'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;THEN&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; TSA_CODE_1 = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495421#M130744</guid>
      <dc:creator>AP101</dc:creator>
      <dc:date>2018-09-13T17:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495430#M130749</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;That should work, unless your variable TSA_CODE_1 isn't what it appears to be from this code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here's an example, note how a &amp;amp; c are both strings, whereas b is a numeric.&lt;BR /&gt;&lt;BR /&gt;Reduce your code down to run a similar test and check the log for NOTES/WARNINGS &amp;amp; ERRORS&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t ;
	a='NULL' ;
	b=. ;
	c='NULL' ;
	if c='NULL' then
		c='' ;
run ;
proc print data=t ;
run ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495430#M130749</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2018-09-13T17:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495434#M130752</link>
      <description>&lt;P&gt;I prefer call missing instead of ' ' or .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data t ;
	a='NULL' ;
	b=. ;
	c='NULL' ;
	
run ;

data want;
set t;
if c='NULL' then call missing(c) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495434#M130752</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-13T17:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495439#M130755</link>
      <description>&lt;P&gt;That worked to remove the NULL values and the 6 digit code string&amp;nbsp;that is also in the column. I want to maintain the code string but just remove any instances of the word NULL in the same field. How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;TSA_CODE_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#ff6600"&gt;061002&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#ff6600"&gt;071004&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#ff6600"&gt;101002&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 13 Sep 2018 18:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495439#M130755</guid>
      <dc:creator>AP101</dc:creator>
      <dc:date>2018-09-13T18:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495450#M130757</link>
      <description>As we all know ,Null is a char value. So you can remove it using either if condition or with call missing--&lt;BR /&gt;1. data test;&lt;BR /&gt;input x1 $;&lt;BR /&gt;if X1='null' then x1='';&lt;BR /&gt;cards;&lt;BR /&gt;A1&lt;BR /&gt;null&lt;BR /&gt;A2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;2. data test;&lt;BR /&gt;input x1 $;&lt;BR /&gt;if X1='null' then call missing(x1);&lt;BR /&gt;cards;&lt;BR /&gt;A1&lt;BR /&gt;null&lt;BR /&gt;A2&lt;BR /&gt;;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 13 Sep 2018 18:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495450#M130757</guid>
      <dc:creator>Vibcom</dc:creator>
      <dc:date>2018-09-13T18:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495452#M130758</link>
      <description>&lt;P&gt;Check if leading or trailing blanks are causing the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;IF &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;strip&lt;/FONT&gt;(&lt;/STRONG&gt;TSA_CODE_1) =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'NULL'&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;THEN&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;TSA_CODE_1 =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 18:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495452#M130758</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-09-13T18:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: word NULL in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495456#M130759</link>
      <description>Thanks! Adding the&amp;nbsp;STRIP worked. I now have:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TSA_CODE_1&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;061002&lt;BR /&gt;071004&lt;BR /&gt;101002&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;</description>
      <pubDate>Thu, 13 Sep 2018 18:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/word-NULL-in-dataset/m-p/495456#M130759</guid>
      <dc:creator>AP101</dc:creator>
      <dc:date>2018-09-13T18:45:39Z</dc:date>
    </item>
  </channel>
</rss>

