<?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 INPUT function reported 'WARNING: in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445765#M111749</link>
    <description>&lt;P&gt;WARNING: INPUT function reported 'WARNING: Illegal first argument to function' while processing WHERE&lt;BR /&gt;clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert a year to numeric and subset data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where input(SUBSTR(trim(Primary_Completion_Date),LENGTH(TRIM(Primary_Completion_Date))-3),best.) &amp;gt;=2015;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 10:01:22 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2018-03-15T10:01:22Z</dc:date>
    <item>
      <title>INPUT function reported 'WARNING:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445765#M111749</link>
      <description>&lt;P&gt;WARNING: INPUT function reported 'WARNING: Illegal first argument to function' while processing WHERE&lt;BR /&gt;clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert a year to numeric and subset data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where input(SUBSTR(trim(Primary_Completion_Date),LENGTH(TRIM(Primary_Completion_Date))-3),best.) &amp;gt;=2015;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445765#M111749</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2018-03-15T10:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function reported 'WARNING:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445769#M111751</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Please post test data in the form of a datastep!!&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It takes away the whole guessing part.&amp;nbsp; What does primary_completion_date look like, is it numeric or character?&amp;nbsp; If its numeric you don't need any of that:&lt;/P&gt;
&lt;PRE&gt;where year(primary_completion_date) &amp;gt;= 2015;&lt;/PRE&gt;
&lt;P&gt;If its character convert to numeric first:&lt;/P&gt;
&lt;PRE&gt;where year(input(primary_completion_date,yymmdd10.)) &amp;gt;= 2015;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445769#M111751</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-15T10:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function reported 'WARNING:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445771#M111752</link>
      <description>&lt;P&gt;the date is charatcter string and I'm getting the year from that string "02/08/2015"&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445771#M111752</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2018-03-15T10:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function reported 'WARNING:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445775#M111753</link>
      <description>&lt;P&gt;So:&lt;/P&gt;
&lt;PRE&gt;where year(input(primary_completion_date,ddmmyy10.)) &amp;gt;= 2015;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Mar 2018 10:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445775#M111753</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-15T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function reported 'WARNING:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445790#M111761</link>
      <description>&lt;P&gt;If your date is as you posted, your code has to work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
primary_completion_date = "02/08/2015";
x1 = input(SUBSTR(trim(Primary_Completion_Date),LENGTH(TRIM(Primary_Completion_Date))-3),best.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log from that:&lt;/P&gt;
&lt;PRE&gt;27         data test;
28         primary_completion_date = "02/08/2015";
29         x1 = input(SUBSTR(trim(Primary_Completion_Date),LENGTH(TRIM(Primary_Completion_Date))-3),best.);
30         run;

NOTE: The data set WORK.TEST has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;As you can see, no WARNING.&lt;/P&gt;
&lt;P&gt;So I guess your primary_completion_date is not really what you posted. Could it be that it is already a SAS date (numeric with date format)?&lt;/P&gt;
&lt;P&gt;Maxim 3: Know your data.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 11:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-reported-WARNING/m-p/445790#M111761</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-15T11:36:37Z</dc:date>
    </item>
  </channel>
</rss>

