<?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: ERROR: Function INTCK requires a numeric expression as argument 2. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349039#M80913</link>
    <description>&lt;P&gt;The error says it all:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: Function INTCK requires a numeric expression as argument 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where intck("month",completion_date,"&amp;amp;completion_date."d&lt;WBR /&gt;)=0; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The arrow indicates the second argument, that needs to be numeric, assuming it is character currently. &amp;nbsp;May input(completion_date,ddmmyy10.)?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2017 09:55:02 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-04-11T09:55:02Z</dc:date>
    <item>
      <title>ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349034#M80909</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any idea how I resolve this error message please?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code below -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let offset = -1;&lt;/P&gt;
&lt;P&gt;%let completion_date=%sysfunc(intnx(month,%sysfunc(today()),&amp;amp;offset.),date9.); &amp;nbsp;%put &amp;amp;completion_date;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data split;&lt;BR /&gt;set input.CO_SPLIT_&amp;amp;runmonth. (keep= mo split applseq completion_date); &lt;BR /&gt;sl_applseq=applseq+0;&lt;BR /&gt;where intck("month",completion_date,"&amp;amp;completion_date."d)=0; &lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 09:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349034#M80909</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2017-04-11T09:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349037#M80911</link>
      <description>&lt;P&gt;I think you need to&amp;nbsp;&lt;SPAN&gt;convert the character dates to numeric.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 09:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349037#M80911</guid>
      <dc:creator>abhityagi</dc:creator>
      <dc:date>2017-04-11T09:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349039#M80913</link>
      <description>&lt;P&gt;The error says it all:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: Function INTCK requires a numeric expression as argument 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where intck("month",completion_date,"&amp;amp;completion_date."d&lt;WBR /&gt;)=0; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The arrow indicates the second argument, that needs to be numeric, assuming it is character currently. &amp;nbsp;May input(completion_date,ddmmyy10.)?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 09:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349039#M80913</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-11T09:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349040#M80914</link>
      <description>&lt;P&gt;The variable is a Charecter $CHAR16.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the input but that doesn't seem to work, most likely as I'm not sure how it fit's within my code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data split;&lt;BR /&gt;set muinput.COMPS_SPLIT_5YEARS_&amp;amp;runmonth. (keep= mortgage split applseq completion_date); &lt;BR /&gt;sl_applseq=applseq+0;&lt;BR /&gt;input (completion_date, ddmmyy10.);&lt;BR /&gt;where intck("month",completion_date,"&amp;amp;completion_date."d)=0; &lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 10:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349040#M80914</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2017-04-11T10:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349061#M80924</link>
      <description>&lt;P&gt;The variable COMPLETION_DATE is a character variable. &amp;nbsp;If it looks to you like it has date values then you need to use the INPUT() function to convert it to actual date values. For examples if the values looke like '01JAN2017' then you could use the DATE9 informat to convert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where intck("month",input(completion_date,date9),"&amp;amp;completion_date."d)=0; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Apr 2017 11:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349061#M80924</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-11T11:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Function INTCK requires a numeric expression as argument 2.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349079#M80933</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188367"&gt;@Brandon16&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;The variable is a Charecter $CHAR16.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the input but that doesn't seem to work, most likely as I'm not sure how it fit's within my code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data split;&lt;BR /&gt;set muinput.COMPS_SPLIT_5YEARS_&amp;amp;runmonth. (keep= mortgage split applseq completion_date); &lt;BR /&gt;sl_applseq=applseq+0;&lt;BR /&gt;input (completion_date, ddmmyy10.);&lt;BR /&gt;where intck("month",completion_date,"&amp;amp;completion_date."d)=0; &lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;input() is not a statement, it is a function.&lt;/P&gt;
&lt;P&gt;Use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newvar = input(oldvar,format.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to create a numerical variable from a character variable. Note that you cannot convert "in place", a variable keeps its type.&lt;/P&gt;
&lt;P&gt;Use a format that fits the layout of your character data. If in doubt, post some example values for your completion_date.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 12:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Function-INTCK-requires-a-numeric-expression-as-argument-2/m-p/349079#M80933</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-11T12:49:10Z</dc:date>
    </item>
  </channel>
</rss>

