<?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: Do Loops with Multiple Conditions in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229670#M2390</link>
    <description>&lt;P&gt;If you are looking for an IML solution, then the data step syntax above will not work.&amp;nbsp; Other&amp;nbsp;solutions would be to have two loops or save all the values of SamSize in a vector as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  ss = do(5,50,5)||do(60,100,10);
  do i = 1 to ncol(ss);
    SampSize=ss[i];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Oct 2015 10:24:53 GMT</pubDate>
    <dc:creator>IanWakeling</dc:creator>
    <dc:date>2015-10-13T10:24:53Z</dc:date>
    <item>
      <title>Do Loops with Multiple Conditions</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229631#M2388</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if it was possible to have a do loop that satisfies two conditions. For example, in my SAS code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do SampSize = 5 to 50 by 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want my code to do the above do loop but satisfy the following condition as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do SampSize = 60 to 100 by 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to combine the two conditions (e.g. do SampSize 5 to 50 by 5 and SampSize = 60 to 100 by 10)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 04:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229631#M2388</guid>
      <dc:creator>tbanh</dc:creator>
      <dc:date>2015-10-13T04:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loops with Multiple Conditions</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229640#M2389</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data A;&lt;BR /&gt;&amp;nbsp; Do SampSize= 5 To 50 By 5, 60 To 100 By 10;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output;&lt;BR /&gt;&amp;nbsp; End;&lt;BR /&gt;Run;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 05:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229640#M2389</guid>
      <dc:creator>user24feb</dc:creator>
      <dc:date>2015-10-13T05:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loops with Multiple Conditions</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229670#M2390</link>
      <description>&lt;P&gt;If you are looking for an IML solution, then the data step syntax above will not work.&amp;nbsp; Other&amp;nbsp;solutions would be to have two loops or save all the values of SamSize in a vector as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  ss = do(5,50,5)||do(60,100,10);
  do i = 1 to ncol(ss);
    SampSize=ss[i];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Do-Loops-with-Multiple-Conditions/m-p/229670#M2390</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2015-10-13T10:24:53Z</dc:date>
    </item>
  </channel>
</rss>

