<?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: calling INTRR function with a dynamic number of arguments in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300766#M63574</link>
    <description>&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;Since my program allows only a maximum of 12 terms, I can simply change my program as follows:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;c&lt;/EM&gt;&lt;/STRONG&gt;(n, Term);&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;where the macro c is changed as follows:&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; c(t, term);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select (&amp;amp;term);&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;01&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;02&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;03&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;9&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;11&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; otherwise put &lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;'ERROR: '&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &amp;amp;term=;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%m&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; c;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2016 14:30:13 GMT</pubDate>
    <dc:creator>Warren</dc:creator>
    <dc:date>2016-09-26T14:30:13Z</dc:date>
    <item>
      <title>calling INTRR function with a dynamic number of arguments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300762#M63572</link>
      <description>&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;Dear Sir/Madam,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I want to be able to call the function INTRR with a dynamic number of arguments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;My program calls INTRR this way: EIRn = INTRR(1, -Orig_Bal %c(n));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;My macro c is as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;macro&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; c(t);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; term;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , cf&amp;amp;t(&amp;amp;i)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; c;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;This gives me the following errors.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;ERROR 71-185: The INTRR function call does not have enough arguments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operand is required. The condition was: term&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;ERROR: The macro C will stop executing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;It worked before when my macro c was as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; c(t);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; %maxTerm;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , cf&amp;amp;t(&amp;amp;i)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; c;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;But now, every observation has a different Term, and I cannot assign Term to %maxTerm and use it in the same data step.&amp;nbsp;&amp;nbsp;&amp;nbsp; How can I resolve this error?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt;"&gt;Warren&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300762#M63572</guid>
      <dc:creator>Warren</dc:creator>
      <dc:date>2016-09-26T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: calling INTRR function with a dynamic number of arguments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300763#M63573</link>
      <description>&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;The following answer is from SAS Technical Support.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;Hello Warren,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;The following is not valid because you cannot place DATA step variables on a %DO loop.&amp;nbsp; Term is just seen as text.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;&lt;SPAN style="color: rgb(0, 0, 255); font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-size: 10pt;"&gt; i = &lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-size: 10pt;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: rgb(0, 0, 255); font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-size: 10pt;"&gt; term;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;You will need to do this in multiple steps where you create macro variables in the first step to hold each value of term and then use the macro variables in the second step.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;Thank You,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;Russ Tyndall&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;SAS Technical Support Analyst&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Microsoft Sans Serif; font-size: 10pt;"&gt;SAS Certified Advanced Programmer for SAS 9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300763#M63573</guid>
      <dc:creator>Warren</dc:creator>
      <dc:date>2016-09-26T14:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: calling INTRR function with a dynamic number of arguments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300766#M63574</link>
      <description>&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;Since my program allows only a maximum of 12 terms, I can simply change my program as follows:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;c&lt;/EM&gt;&lt;/STRONG&gt;(n, Term);&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;where the macro c is changed as follows:&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; c(t, term);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select (&amp;amp;term);&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;01&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;02&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;03&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;when (&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;) EIR&amp;amp;t = INTRR(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;,-Orig_Bal,cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;9&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;11&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;),cf&amp;amp;t(&lt;/SPAN&gt;&lt;STRONG style="color: rgb(0, 128, 128); font-family: Courier New; font-size: 10pt;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; otherwise put &lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;'ERROR: '&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &amp;amp;term=;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%m&lt;SPAN style="color: rgb(0, 0, 128); font-family: Courier New; font-size: 10pt;"&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; c;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calling-INTRR-function-with-a-dynamic-number-of-arguments/m-p/300766#M63574</guid>
      <dc:creator>Warren</dc:creator>
      <dc:date>2016-09-26T14:30:13Z</dc:date>
    </item>
  </channel>
</rss>

