<?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: invalid argument in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362710#M85707</link>
    <description>&lt;P&gt;Are you sure that taper_d is a datetime variable and not just a date variable? &amp;nbsp;This is one reason why we always ask for test data in the form of a datastep, if we can see the data and the structure, then we can imediately say wether it is that or not, now we have to have this back and forth, is the variable numeric, is it a date varaible, does it have non-missing data etc. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 13:37:18 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-05-30T13:37:18Z</dc:date>
    <item>
      <title>invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362700#M85705</link>
      <description>&lt;P&gt;when I use this function it give error message me invalid agrgument&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TAPER_A=YRDIF(DOB,datepart(TAPER_D),"ACTUAL");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function YRDIF(13371,.,'ACTUAL') at line 770 column 11.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 13:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362700#M85705</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2017-05-30T13:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362708#M85706</link>
      <description>&lt;P&gt;It would appear that the value of datepart(TAPER_D) is missing, and that is not allowed.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 13:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362708#M85706</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-30T13:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362710#M85707</link>
      <description>&lt;P&gt;Are you sure that taper_d is a datetime variable and not just a date variable? &amp;nbsp;This is one reason why we always ask for test data in the form of a datastep, if we can see the data and the structure, then we can imediately say wether it is that or not, now we have to have this back and forth, is the variable numeric, is it a date varaible, does it have non-missing data etc. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 13:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362710#M85707</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T13:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362721#M85708</link>
      <description>&lt;P&gt;it is date variable stored as numaric&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362721#M85708</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2017-05-30T14:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362722#M85709</link>
      <description>&lt;P&gt;This would be a normal result if the variable TAPER_D occasionally takes on a missing value.&amp;nbsp; For those observations, there's no way to compute TAPER_A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not clear whether using DATEPART is the correct step or not, but it is not causing missing values for TAPER_A.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362722#M85709</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-30T14:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362725#M85711</link>
      <description>&lt;P&gt;So you want, in this context:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if taper_d ne . then taper_a=yrdiff(dob,taper_d,"actual"); &lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362725#M85711</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T14:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362735#M85715</link>
      <description>&lt;P&gt;11549 if TAPER_D ne . then TAPER_A=yrdiff(DOB,TAPER_D,"actual");&lt;BR /&gt;------&lt;BR /&gt;68&lt;BR /&gt;ERROR 68-185: The function YRDIFF is unknown, or cannot be accessed.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362735#M85715</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2017-05-30T14:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362738#M85717</link>
      <description>&lt;P&gt;Its just a typo, I put one extra f:&lt;/P&gt;
&lt;PRE&gt;if taper_d ne . then taper_a=yrdif(dob,taper_d,"actual"); &lt;/PRE&gt;</description>
      <pubDate>Tue, 30 May 2017 14:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362738#M85717</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T14:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362742#M85719</link>
      <description>&lt;P&gt;The data stored the numaric missing as blank&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362742#M85719</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2017-05-30T14:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362745#M85722</link>
      <description>&lt;P&gt;&lt;BR /&gt;NOTE: Invalid argument to function YRDIF( ,18148,'ACTUAL') at line 12375 column 34.&lt;BR /&gt;NOTE: Invalid argument to function YRDIF( ,18189,'actual') at line 12378 column 30.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I find the data stored the numaric missing as blnk not as .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362745#M85722</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2017-05-30T14:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: invalid argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362746#M85723</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Please post test data in the form of a datastep!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have now gone back and forward several times purely because I can't see the data. &amp;nbsp;It now seems your saying that DOB is a character variable not numeric. &amp;nbsp;If so then you need to convert it to numeric, and also add into the logic if &amp;lt;date1&amp;gt; is not missing and &amp;lt;date2&amp;gt; is not missing.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/invalid-argument/m-p/362746#M85723</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-30T14:51:19Z</dc:date>
    </item>
  </channel>
</rss>

