<?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 do loops in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873192#M345002</link>
    <description>&lt;P&gt;visit&lt;BR /&gt;week1&lt;BR /&gt;week2&lt;BR /&gt;week3&lt;BR /&gt;week4&lt;BR /&gt;week5&lt;/P&gt;&lt;P&gt;new variable days should be created and values in days are multiples of 7&lt;BR /&gt;week1 day=7&lt;BR /&gt;week2 day=14&lt;BR /&gt;week3 day=21 etc.,&lt;/P&gt;&lt;P&gt;The output should be&lt;/P&gt;&lt;P&gt;visit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;days&lt;BR /&gt;week1&amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;BR /&gt;week2&amp;nbsp; &amp;nbsp; &amp;nbsp;14&lt;BR /&gt;week3&amp;nbsp; &amp;nbsp; &amp;nbsp;21&lt;BR /&gt;week4&amp;nbsp; &amp;nbsp; &amp;nbsp;28&lt;BR /&gt;week5&amp;nbsp; &amp;nbsp; &amp;nbsp;35&lt;/P&gt;&lt;P&gt;week1&amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;&lt;P&gt;week2&amp;nbsp; &amp;nbsp; &amp;nbsp; 14&lt;/P&gt;&lt;P&gt;week3&amp;nbsp; &amp;nbsp; &amp;nbsp; 21&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 May 2023 15:09:11 GMT</pubDate>
    <dc:creator>Sowmya12</dc:creator>
    <dc:date>2023-05-01T15:09:11Z</dc:date>
    <item>
      <title>do loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873192#M345002</link>
      <description>&lt;P&gt;visit&lt;BR /&gt;week1&lt;BR /&gt;week2&lt;BR /&gt;week3&lt;BR /&gt;week4&lt;BR /&gt;week5&lt;/P&gt;&lt;P&gt;new variable days should be created and values in days are multiples of 7&lt;BR /&gt;week1 day=7&lt;BR /&gt;week2 day=14&lt;BR /&gt;week3 day=21 etc.,&lt;/P&gt;&lt;P&gt;The output should be&lt;/P&gt;&lt;P&gt;visit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;days&lt;BR /&gt;week1&amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;BR /&gt;week2&amp;nbsp; &amp;nbsp; &amp;nbsp;14&lt;BR /&gt;week3&amp;nbsp; &amp;nbsp; &amp;nbsp;21&lt;BR /&gt;week4&amp;nbsp; &amp;nbsp; &amp;nbsp;28&lt;BR /&gt;week5&amp;nbsp; &amp;nbsp; &amp;nbsp;35&lt;/P&gt;&lt;P&gt;week1&amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;&lt;P&gt;week2&amp;nbsp; &amp;nbsp; &amp;nbsp; 14&lt;/P&gt;&lt;P&gt;week3&amp;nbsp; &amp;nbsp; &amp;nbsp; 21&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 15:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873192#M345002</guid>
      <dc:creator>Sowmya12</dc:creator>
      <dc:date>2023-05-01T15:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: do loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873193#M345003</link>
      <description>&lt;P&gt;If they are always in order you could do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data one; &lt;BR /&gt;input visit $; &lt;BR /&gt;cards; &lt;BR /&gt;week1 &lt;BR /&gt;week2 &lt;BR /&gt;week3 &lt;BR /&gt;week4 &lt;BR /&gt;week5 &lt;BR /&gt;week1 &lt;BR /&gt;week2 &lt;BR /&gt;week3 &lt;BR /&gt;; &lt;BR /&gt;&lt;BR /&gt;data new; &lt;BR /&gt;set one; &lt;BR /&gt;if visit='week1' then days=7; &lt;BR /&gt;else days+7; &lt;BR /&gt;run; &lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;run; &lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 15:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873193#M345003</guid>
      <dc:creator>russt_sas</dc:creator>
      <dc:date>2023-05-01T15:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: do loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873195#M345004</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;day = input(substr(visit,5),best.) * 7;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2023 15:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-loops/m-p/873195#M345004</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-01T15:18:11Z</dc:date>
    </item>
  </channel>
</rss>

