<?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 substract, input, etc in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243273#M45219</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is below:&lt;/P&gt;&lt;P&gt;if upcase(substr (variablea,1,1)) in ('O''P') then delete;&lt;BR /&gt;&amp;nbsp;variableb = input(substr(variable,1,3), 8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the data it generates, i still see "O" exist and that is why for the second statement, it generates missing data.&lt;/P&gt;&lt;P&gt;"NOTE: Invalid argument to function INPUT at line 581 column 17"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would anybody give advice how to fix the problem? what is wrong with my code?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2016 17:49:05 GMT</pubDate>
    <dc:creator>Bal23</dc:creator>
    <dc:date>2016-01-13T17:49:05Z</dc:date>
    <item>
      <title>substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243273#M45219</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is below:&lt;/P&gt;&lt;P&gt;if upcase(substr (variablea,1,1)) in ('O''P') then delete;&lt;BR /&gt;&amp;nbsp;variableb = input(substr(variable,1,3), 8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the data it generates, i still see "O" exist and that is why for the second statement, it generates missing data.&lt;/P&gt;&lt;P&gt;"NOTE: Invalid argument to function INPUT at line 581 column 17"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would anybody give advice how to fix the problem? what is wrong with my code?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 17:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243273#M45219</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-01-13T17:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243277#M45220</link>
      <description>&lt;P&gt;You have a typo in your code:&lt;/P&gt;
&lt;PRE&gt;if upcase(substr(variablea,1,1)) in ('O','P') then delete;
variableb=input(substr(variable,1,3), 8.);&lt;/PRE&gt;
&lt;P&gt;Note the comma separating the elements in the in() list.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 17:57:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243277#M45220</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-13T17:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243280#M45221</link>
      <description>&lt;P&gt;You need a comma between the apostrophes&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;'O''P'&lt;/STRONG&gt; -&amp;gt;&amp;nbsp;&lt;STRONG&gt;'O','P'&lt;/STRONG&gt; . The way it reads now is &lt;STRONG&gt;upcase(substr (variablea,1,1))&lt;/STRONG&gt; should be equal to &lt;STRONG&gt;O'P&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 18:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243280#M45221</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-01-13T18:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243285#M45223</link>
      <description>&lt;P&gt;IN operator requires either a comma or a blank space between elements to compare. With neither the two quotes in the middle are treated as a single quote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the records with O or P values in the first column were not deleted then you have the&amp;nbsp;input function&amp;nbsp;trying to read something like P12 as numeric and failing.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 18:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243285#M45223</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-13T18:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243287#M45224</link>
      <description>&lt;P&gt;Thank you, everyone. It is solved!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 18:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243287#M45224</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-01-13T18:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: substract, input, etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243294#M45227</link>
      <description>&lt;P&gt;Please mark the solution as correct on the forum.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 18:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/substract-input-etc/m-p/243294#M45227</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-13T18:45:31Z</dc:date>
    </item>
  </channel>
</rss>

