<?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: noob question on %do alternatives in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783819#M250023</link>
    <description>thanks appreciate the help</description>
    <pubDate>Fri, 03 Dec 2021 02:37:37 GMT</pubDate>
    <dc:creator>thryce85</dc:creator>
    <dc:date>2021-12-03T02:37:37Z</dc:date>
    <item>
      <title>noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783704#M249973</link>
      <description>&lt;P&gt;I want to do a loop without having to go into a data step or write a macro.&amp;nbsp; I thought %do would work but it seems like I have to use that within a macro.&amp;nbsp; Are there any alternative to %do or am I stuck defining Macros and then calling them. Basically want to do this without annoyingly having to wrap it in a macro.&amp;nbsp; &amp;nbsp;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%Macro Make_5 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%DO I = 1 %TO 5;&lt;/P&gt;&lt;P&gt;%put -------- D&amp;amp;I;&lt;BR /&gt;%END;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%Mend Make_5;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 17:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783704#M249973</guid>
      <dc:creator>thryce85</dc:creator>
      <dc:date>2021-12-02T17:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783709#M249977</link>
      <description>&lt;P&gt;This is a non-issue issue. Just go ahead and use the macro.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 17:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783709#M249977</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2021-12-02T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783711#M249979</link>
      <description>&lt;P&gt;%do must be in a macro&lt;BR /&gt;&lt;BR /&gt;The question is what are you attempting to do? All you are doing in the code is writing a message to the log&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---D1&lt;/P&gt;
&lt;P&gt;---D2&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;I'm guessing you want to do something more than just that, so what do you want to do?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 17:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783711#M249979</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-12-02T17:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783716#M249982</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/363904"&gt;@thryce85&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to do a loop without having to go into a data step or write a macro.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To do what exactly?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 17:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783716#M249982</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-02T17:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783718#M249983</link>
      <description>&lt;P&gt;just playing with it now .&amp;nbsp; but thinking more a long the lines of&amp;nbsp; using it along with %IF&amp;nbsp; %THEN %DO.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sth slong the lines of .&amp;nbsp; &amp;nbsp;Trying to learn data driven programming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%IF &amp;amp;SYSDAY=Friday %THEN %DO;&lt;/P&gt;&lt;P&gt;%do I=1 %to 5;&lt;/P&gt;&lt;P&gt;data d&amp;amp;i;&lt;/P&gt;&lt;P&gt;*some data junk;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%END;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 18:00:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783718#M249983</guid>
      <dc:creator>thryce85</dc:creator>
      <dc:date>2021-12-02T18:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783722#M249985</link>
      <description>&lt;P&gt;So ignoring the fact you are missing %MACRO/%MEND statements to define the macro&lt;BR /&gt;What you have here is some code to create 5 identical datasets called d1, d2, d3, d4 &amp;amp; d5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not the most efficient approach if creating 5 identical datasets is the goal, although it is an approach that will work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 18:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783722#M249985</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-12-02T18:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783762#M249996</link>
      <description>&lt;P&gt;You&amp;nbsp;&lt;STRONG&gt;can&lt;/STRONG&gt; use &lt;A href="https://blogs.sas.com/content/sasdummy/2018/07/05/if-then-else-sas-programs/" target="_self"&gt;conditional macro statements (%IF..%THEN...%ELSE) in open code&lt;/A&gt;, without a macro. However, loop iterations for a block of code does require a %macro/%mend block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/basess/n053a58fwk57v7n14h8x7y7u34y4.htm" target="_self"&gt;overlook the DATA step iteration&lt;/A&gt;, which can be used to take an action for every observation in a data set. We often see people going straight to macro when actually a DATA step is more appropriate.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 19:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783762#M249996</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-12-02T19:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: noob question on %do alternatives</title>
      <link>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783819#M250023</link>
      <description>thanks appreciate the help</description>
      <pubDate>Fri, 03 Dec 2021 02:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/noob-question-on-do-alternatives/m-p/783819#M250023</guid>
      <dc:creator>thryce85</dc:creator>
      <dc:date>2021-12-03T02:37:37Z</dc:date>
    </item>
  </channel>
</rss>

