<?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 sas macro in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-macro/m-p/170654#M13072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the table below, i want to create&amp;nbsp; cure_stress_s1 n number of times but not sure how to put this into a macro.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;table&lt;/P&gt;&lt;P&gt;period&amp;nbsp; curr_rate&amp;nbsp; wt_param &lt;BR /&gt;0 0.01&amp;nbsp; 0.21&lt;BR /&gt;1 0.02&amp;nbsp; 0.52&lt;BR /&gt;2 0.03&amp;nbsp; 0.35&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test; &lt;BR /&gt;set table;&amp;nbsp; &lt;BR /&gt; cure_stress_s1 = (cure_rate * (1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s2 = (cure_stress_s1 *(1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s3 = (cure_stress_s2 *(1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s4 = (cure_stress_s3 *(1 + weighted_param_diff));&lt;BR /&gt; &lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;Any help would be appreciated. &lt;BR /&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Feb 2015 14:07:35 GMT</pubDate>
    <dc:creator>shbe</dc:creator>
    <dc:date>2015-02-16T14:07:35Z</dc:date>
    <item>
      <title>sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-macro/m-p/170654#M13072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the table below, i want to create&amp;nbsp; cure_stress_s1 n number of times but not sure how to put this into a macro.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;table&lt;/P&gt;&lt;P&gt;period&amp;nbsp; curr_rate&amp;nbsp; wt_param &lt;BR /&gt;0 0.01&amp;nbsp; 0.21&lt;BR /&gt;1 0.02&amp;nbsp; 0.52&lt;BR /&gt;2 0.03&amp;nbsp; 0.35&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test; &lt;BR /&gt;set table;&amp;nbsp; &lt;BR /&gt; cure_stress_s1 = (cure_rate * (1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s2 = (cure_stress_s1 *(1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s3 = (cure_stress_s2 *(1 + weighted_param_diff));&lt;BR /&gt; cure_stress_s4 = (cure_stress_s3 *(1 + weighted_param_diff));&lt;BR /&gt; &lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;Any help would be appreciated. &lt;BR /&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 14:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-macro/m-p/170654#M13072</guid>
      <dc:creator>shbe</dc:creator>
      <dc:date>2015-02-16T14:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-macro/m-p/170655#M13073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't want macros, you want arrays:&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array cure_stress{4} 8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cure_stress{1}=cure_rate * (1 + weighted_param_diff);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do I=2 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cure_stress{I}=cure_stress{I-1} * (1 + weighted_param_diff);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You could of course put number of iterations into a macro variable if you want and replace that in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 14:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-macro/m-p/170655#M13073</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-02-16T14:23:00Z</dc:date>
    </item>
  </channel>
</rss>

