<?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: identify which observation has a character value and generating conversion note in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414422#M101541</link>
    <description>&lt;P&gt;In your code snippet:&lt;/P&gt;
&lt;PRE&gt;if siresult1^=. then do;  &amp;lt;= siresult is numeric
 if siresult1&amp;lt; SINORMLO1 then Range='L';
 if siresult1&amp;gt;SINORMHI1 then Range='H';
 if SINORMLO1&amp;lt;SIRESULT1&amp;lt;SINORMHI1 then Range='';
 results=catx(", ",put(siresult1,8.1), range);
 end;
 else if siresult1='' then do;  &amp;lt;= here you are treating siresult as character&lt;/PRE&gt;
&lt;P&gt;Us the function MISSING:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;else if missing(siresult) then do ...&lt;/P&gt;
&lt;P&gt;OR compare to the missing value&lt;/P&gt;
&lt;P&gt;else if sirresult = . then do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use of missing is a better option as that is one of the functions that works with both numeric and character values. Also it makes the code a bit easier to understand.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 15:33:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-11-17T15:33:54Z</dc:date>
    <item>
      <title>identify which observation has a character value and generating conversion note</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414176#M101465</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am doing a char to numeric conversion, but I am getting one note in my log that says:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt; 6232:23&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have this many lines or columns in my data set.&amp;nbsp; I also don't see any character values that would generate this&amp;nbsp;note.&amp;nbsp; I did a proc freq on all the variables I am converting.&amp;nbsp; Is there any way to specifically identify which value this is pointing to?&amp;nbsp; I have no idea what the 6232:23 is (i have 3504 rows and 14 columns).&amp;nbsp; I know it's not a big deal, but I can't have any conversion notes in my log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length results $100.;&lt;BR /&gt;format range $4.;&lt;BR /&gt; siresult1=input(siresult,best.);&lt;BR /&gt; SINORMLO1=input(SINORMLO,best.);&lt;BR /&gt; SINORMHI1=input(SINORMHI,best.);&lt;BR /&gt; if siresult1^=. then do;&lt;BR /&gt; if siresult1&amp;lt; SINORMLO1 then Range='L';&lt;BR /&gt; if siresult1&amp;gt;SINORMHI1 then Range='H';&lt;BR /&gt; if SINORMLO1&amp;lt;SIRESULT1&amp;lt;SINORMHI1 then Range='';&lt;BR /&gt; results=catx(", ",put(siresult1,8.1), range);&lt;BR /&gt; end;&lt;BR /&gt; else if siresult1='' then do; &lt;BR /&gt; results='';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 23:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414176#M101465</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2017-11-16T23:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: identify which observation has a character value and generating conversion note</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414179#M101468</link>
      <description>&lt;P&gt;The line numbers refer to the numbers in the log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CHECK YOUR LOG. And post it.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 23:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414179#M101468</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-16T23:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: identify which observation has a character value and generating conversion note</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414181#M101470</link>
      <description>&lt;P&gt;The numbers are the position in the log.&lt;/P&gt;
&lt;P&gt;Here line #27 column # 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;25&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; 26 data T;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; 27 A='1'+1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; 28 run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="green"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt; 27:5&amp;nbsp;&lt;BR /&gt; NOTE: The data set WORK.T has 1 observations and 1 variables.&lt;BR /&gt; NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 23:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414181#M101470</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-11-16T23:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: identify which observation has a character value and generating conversion note</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414189#M101473</link>
      <description>Found it!  Thank you.</description>
      <pubDate>Thu, 16 Nov 2017 23:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414189#M101473</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2017-11-16T23:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: identify which observation has a character value and generating conversion note</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414422#M101541</link>
      <description>&lt;P&gt;In your code snippet:&lt;/P&gt;
&lt;PRE&gt;if siresult1^=. then do;  &amp;lt;= siresult is numeric
 if siresult1&amp;lt; SINORMLO1 then Range='L';
 if siresult1&amp;gt;SINORMHI1 then Range='H';
 if SINORMLO1&amp;lt;SIRESULT1&amp;lt;SINORMHI1 then Range='';
 results=catx(", ",put(siresult1,8.1), range);
 end;
 else if siresult1='' then do;  &amp;lt;= here you are treating siresult as character&lt;/PRE&gt;
&lt;P&gt;Us the function MISSING:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;else if missing(siresult) then do ...&lt;/P&gt;
&lt;P&gt;OR compare to the missing value&lt;/P&gt;
&lt;P&gt;else if sirresult = . then do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use of missing is a better option as that is one of the functions that works with both numeric and character values. Also it makes the code a bit easier to understand.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 15:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-which-observation-has-a-character-value-and-generating/m-p/414422#M101541</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-17T15:33:54Z</dc:date>
    </item>
  </channel>
</rss>

