<?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: Need help with INTNX in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76941#M7640</link>
    <description>I'm not sure what kind of interval you are trying to create, but if you intend to always have Monday to Sunday in the current week, I think you misunderstood the use of the week.&lt;I&gt;X&lt;/I&gt; interval. I think that you should stick with week.2, and use the BEGINNING and END with the intnx function:&lt;BR /&gt;
&lt;BR /&gt;
%LET StartDate =%sysfunc(intnx(week.2, "&amp;amp;SYSDATE"D, 0, beginning), DATE9.);&lt;BR /&gt;
%LET EndDate =%sysfunc(intnx(week.2, "&amp;amp;SYSDATE"D, 0, end), DATE9.);&lt;BR /&gt;
%put &amp;amp;startdate &amp;amp;enddate;&lt;BR /&gt;
09MAR2009 15MAR2009&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Fri, 13 Mar 2009 07:57:14 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2009-03-13T07:57:14Z</dc:date>
    <item>
      <title>Need help with INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76939#M7638</link>
      <description>Hi, I am trying to do the following to pass in the system date and subtract the date so the StartDate will read 09MAR2009 and the EndDate will be 15MAR2009. I'm not sure if I am doing this correctly. This will allow me to run the code automatically instead of hard coding a date each time. Any help is appreciated!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%LET StartDate =%sysfunc(intnx(week.2, "&amp;amp;SYSDATE"D, 0), DATE9.);&lt;BR /&gt;
%LET EndDate =%sysfunc(intnx(week.7, "&amp;amp;SYSDATE"D, 0), DATE9.);&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE TD_Mature AS&lt;BR /&gt;
SELECT distinct t.contract_no AS Matured_TD&lt;BR /&gt;
FROM ptware.term_deposits t&lt;BR /&gt;
WHERE t.mature_date between '&amp;amp;StartDate' and '&amp;amp;EndDate'&lt;BR /&gt;
      AND t.cease_date is not null &lt;BR /&gt;
      AND t.mature_date = t.cease_date;&lt;BR /&gt;
quit;</description>
      <pubDate>Fri, 13 Mar 2009 02:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76939#M7638</guid>
      <dc:creator>ILeskow</dc:creator>
      <dc:date>2009-03-13T02:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76940#M7639</link>
      <description>Setting OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC;  would likely help reveal SAS behavior when using your macro variables in your PROC SQL code.  The macro variable string, when coded within single quote marks, will not be resolved, as compared to coding the macro variable string inside double-quote marks -- this is a SAS standard feature.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS DOC links from the SAS support website  &lt;A href="http://support.sas" target="_blank"&gt;http://support.sas&lt;/A&gt; com/&lt;BR /&gt;
&lt;BR /&gt;
Introduction to Macro Variables&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002293823.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002293823.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Displaying Macro Variable Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a001071910.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a001071910.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS Conference Paper on the topic:&lt;BR /&gt;
&lt;BR /&gt;
Add SAS® Macros to Your Programming Skills: Achieve More, Write Less Code&lt;BR /&gt;
Peter Crawford, Crawford Software Consultancy Ltd, UK&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2008/175-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/175-2008.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76940#M7639</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-13T07:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with INTNX</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76941#M7640</link>
      <description>I'm not sure what kind of interval you are trying to create, but if you intend to always have Monday to Sunday in the current week, I think you misunderstood the use of the week.&lt;I&gt;X&lt;/I&gt; interval. I think that you should stick with week.2, and use the BEGINNING and END with the intnx function:&lt;BR /&gt;
&lt;BR /&gt;
%LET StartDate =%sysfunc(intnx(week.2, "&amp;amp;SYSDATE"D, 0, beginning), DATE9.);&lt;BR /&gt;
%LET EndDate =%sysfunc(intnx(week.2, "&amp;amp;SYSDATE"D, 0, end), DATE9.);&lt;BR /&gt;
%put &amp;amp;startdate &amp;amp;enddate;&lt;BR /&gt;
09MAR2009 15MAR2009&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Fri, 13 Mar 2009 07:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-INTNX/m-p/76941#M7640</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-03-13T07:57:14Z</dc:date>
    </item>
  </channel>
</rss>

