<?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: Define future years in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897402#M354625</link>
    <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your code I expect one or more of the following to appear in your LOG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;1: NOTE: Numeric values have been converted to character&lt;BR /&gt;values at the places given by: (Line):(Column).&amp;nbsp; &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The above will appear if you have no variable currently in your data set named Year, or Year exists but is a numeric value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2: NOTE: Argument 1 to function INTNX() at line NNN&lt;BR /&gt;column ZZ is invalid.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The above is going to appear because year either is blank, previously no value assigned, or attempts to use a value like 2023 as an interval for the function.&lt;/P&gt;
&lt;P&gt;Leading to:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;3: NOTE: Mathematical operations could not be performed at the following&lt;BR /&gt;places. The results of the operations have been set to missing&lt;BR /&gt;values.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;because what ever Year resolved to was not a valid interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107110"&gt;@joon1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Madam/Sir,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to define future years (t1 through t5) after the event year (cartel_eyear). The code using intnx function does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lead_t1=intnx(year, cartel_eyear, 1);&lt;/P&gt;
&lt;P&gt;lead_t2=intnx(year, cartel_eyear, 2);&lt;/P&gt;
&lt;P&gt;lead_t3=intnx(year, cartel_eyear, 3);&lt;/P&gt;
&lt;P&gt;lead_t4=intnx(year, cartel_eyear, 4);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be highly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Joon1&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 14:41:40 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-10-05T14:41:40Z</dc:date>
    <item>
      <title>Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897361#M354597</link>
      <description>&lt;P&gt;Dear Madam/Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to define future years (t1 through t5) after the event year (cartel_eyear). The code using intnx function does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lead_t1=intnx(year, cartel_eyear, 1);&lt;/P&gt;&lt;P&gt;lead_t2=intnx(year, cartel_eyear, 2);&lt;/P&gt;&lt;P&gt;lead_t3=intnx(year, cartel_eyear, 3);&lt;/P&gt;&lt;P&gt;lead_t4=intnx(year, cartel_eyear, 4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Joon1&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 11:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897361#M354597</guid>
      <dc:creator>joon1</dc:creator>
      <dc:date>2023-10-05T11:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897363#M354599</link>
      <description>&lt;P&gt;What are typical values of the variable CARTEL_EYEAR? Please also show us the PROC CONTENTS output for this variable.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 11:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897363#M354599</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-05T11:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897379#M354613</link>
      <description>&lt;P&gt;Are you putting quotes around year in the INTNX function?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897379#M354613</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2023-10-05T12:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897400#M354624</link>
      <description>&lt;P&gt;The first argument of intnx needs to be quoted (if you don't have a variable containing the interval), the second argument must be a sas date. Check your data!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897400#M354624</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-10-05T14:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897402#M354625</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your code I expect one or more of the following to appear in your LOG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;1: NOTE: Numeric values have been converted to character&lt;BR /&gt;values at the places given by: (Line):(Column).&amp;nbsp; &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The above will appear if you have no variable currently in your data set named Year, or Year exists but is a numeric value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2: NOTE: Argument 1 to function INTNX() at line NNN&lt;BR /&gt;column ZZ is invalid.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The above is going to appear because year either is blank, previously no value assigned, or attempts to use a value like 2023 as an interval for the function.&lt;/P&gt;
&lt;P&gt;Leading to:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;3: NOTE: Mathematical operations could not be performed at the following&lt;BR /&gt;places. The results of the operations have been set to missing&lt;BR /&gt;values.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;because what ever Year resolved to was not a valid interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107110"&gt;@joon1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Madam/Sir,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to define future years (t1 through t5) after the event year (cartel_eyear). The code using intnx function does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lead_t1=intnx(year, cartel_eyear, 1);&lt;/P&gt;
&lt;P&gt;lead_t2=intnx(year, cartel_eyear, 2);&lt;/P&gt;
&lt;P&gt;lead_t3=intnx(year, cartel_eyear, 3);&lt;/P&gt;
&lt;P&gt;lead_t4=intnx(year, cartel_eyear, 4);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be highly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Joon1&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897402#M354625</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-05T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Define future years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897403#M354626</link>
      <description>&lt;P&gt;Thanks for your kind reply. Data structure doesn't have date. So this function cannot be used.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Define-future-years/m-p/897403#M354626</guid>
      <dc:creator>joon1</dc:creator>
      <dc:date>2023-10-05T14:48:50Z</dc:date>
    </item>
  </channel>
</rss>

