<?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 INTNX function in loop code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675160#M203383</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use an INTNX function in my loop code but it doesn't accept reference to a field in my table. What can I replace the injury date with if i want to reference this specific date that is different on each row?&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;%monthly_query1 ((INTNX('month',t1.Injury_Dte,0,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,1,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,2,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,3,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,4,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,5,'e')))&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 22:53:57 GMT</pubDate>
    <dc:creator>AleksandraGav</dc:creator>
    <dc:date>2020-08-06T22:53:57Z</dc:date>
    <item>
      <title>INTNX function in loop code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675160#M203383</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use an INTNX function in my loop code but it doesn't accept reference to a field in my table. What can I replace the injury date with if i want to reference this specific date that is different on each row?&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;%monthly_query1 ((INTNX('month',t1.Injury_Dte,0,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,1,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,2,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,3,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,4,'e')))&lt;BR /&gt;%monthly_query2 ((INTNX('month',t1.Injury_Dte,5,'e')))&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 22:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675160#M203383</guid>
      <dc:creator>AleksandraGav</dc:creator>
      <dc:date>2020-08-06T22:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX function in loop code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675162#M203385</link>
      <description>You need to provide more details. &lt;BR /&gt;Starting with the actual macro and how the parameter is being used. You may want to look at CALL EXECUTE and use a loop within a data step if you want to call the same macro multiple times.</description>
      <pubDate>Thu, 06 Aug 2020 23:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675162#M203385</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-06T23:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX function in loop code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675163#M203386</link>
      <description>&lt;P&gt;Commas are the delimiters of parameters in macros. So the code you show the first comma is ending the parameter. I suspect that you may get errors related to more parameters than defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You likely need to quote the value that you want inside %str(&amp;lt;entirevalue goes here&amp;gt;) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With t1. garbage I assume you are using this to write some SQL code.&lt;/P&gt;
&lt;P&gt;You might consider using a data step where you can use a DO loop and an array to hold the values. &lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 23:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-function-in-loop-code/m-p/675163#M203386</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-06T23:02:52Z</dc:date>
    </item>
  </channel>
</rss>

