<?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: INTCK in SYSFUNC error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804574#M316852</link>
    <description>&lt;P&gt;I do not think that is too difficult to identify what argument contains an issue.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 17:22:48 GMT</pubDate>
    <dc:creator>SPR</dc:creator>
    <dc:date>2022-03-28T17:22:48Z</dc:date>
    <item>
      <title>INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804396#M316759</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;%SYSFUNC(INTCK("Second",&amp;amp;t1,&amp;amp;t2)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt; generates error but INTCK in a data step works fine.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;%let t1=%SYSFUNC(DateTime());&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;%let t2=%SYSFUNC(DateTime());&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;%let t=%SYSFUNC(INTCK("Second",&amp;amp;t1,&amp;amp;t2));&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;WARNING: An argument to the function INTCK referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;BR /&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set &lt;BR /&gt;to a missing value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;%put &amp;amp;=t1 &amp;amp;=t2 &amp;amp;=t;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LOG:&lt;/P&gt;
&lt;P&gt;/*T1=1963997617.86803 T2=1963999438.99399 T=.*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data a;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;t=INTCK("Second",&amp;amp;t1,&amp;amp;t2);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* dataset a */&lt;/P&gt;
&lt;P&gt;/*t&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;BR /&gt;/*1821&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 15:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804396#M316759</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2022-03-27T15:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804397#M316760</link>
      <description>&lt;P&gt;When using %sysfunc, which is a SAS macro construct, you don't enclose literal arguments to functions in quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;%let t1=%SYSFUNC(DateTime());
%let t2=%SYSFUNC(DateTime());
%let t=%SYSFUNC(INTCK(Second,&amp;amp;t1,&amp;amp;t2));&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Confusing...perhaps. But it's just how SAS macro works as a text generator.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 15:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804397#M316760</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-03-27T15:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804402#M316762</link>
      <description>&lt;P&gt;Datetime values are numbers of seconds.&amp;nbsp; So why bother with INTCK() to get the difference in seconds you can just subtract the values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let duration=%sysevalf(&amp;amp;t2-&amp;amp;t1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Mar 2022 15:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804402#M316762</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-27T15:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804493#M316816</link>
      <description>&lt;P&gt;&lt;SPAN&gt;WARNING: An argument to the function INTCK referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to a missing value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this WARNING/NOTE message said "drop apostrophes in the first argument" or "error in the first argument", it will be much more useful that this lengthy text.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 12:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804493#M316816</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2022-03-28T12:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804498#M316819</link>
      <description>&lt;P&gt;Not sure how %SYSFUNC() is supposed to read your mind.&amp;nbsp; I think it is pretty much just echoing the same error as would be generated if you passed an invalid value in a data step.&lt;/P&gt;
&lt;PRE&gt;10    %put %sysfunc(intck('month',1,2));
WARNING: An argument to the function INTCK referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.
NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set
      to a missing value.
.
11    %put %sysfunc(intck(fred,1,2));
WARNING: An argument to the function INTCK referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.
NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set
      to a missing value.
.
12
13    data _null_;
14      x=intck("'month'",1,2);
15      x=intck("fred",1,2);
16    run;

NOTE: Invalid argument to function INTCK('''month''',1,2) at line 14 column 5.
NOTE: Invalid argument to function INTCK('fred',1,2) at line 15 column 5.
x=. _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing
      values.
      Each place is given by: (Number of times) at (Line):(Column).
      1 at 14:5   1 at 15:5
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2022 13:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804498#M316819</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-28T13:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: INTCK in SYSFUNC error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804574#M316852</link>
      <description>&lt;P&gt;I do not think that is too difficult to identify what argument contains an issue.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 17:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTCK-in-SYSFUNC-error/m-p/804574#M316852</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2022-03-28T17:22:48Z</dc:date>
    </item>
  </channel>
</rss>

