<?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 Loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434901#M107977</link>
    <description>&lt;P&gt;Rick, I agree with you. I think this question is to check if you know 'OUTPUT' statement. without the OUTPUT statement, it will only show the last observation.&amp;nbsp; However, for curiosity I tried to write this program in SAS, Log shows an Error and a Warning as I expected. &amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is a real exam, I will be confused, what is it trying to test us: OUTPUT statement or End statement.&amp;nbsp; I am having an exam next week, wish myself goodluck. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18373i356B75DC1D297C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2018 15:29:31 GMT</pubDate>
    <dc:creator>Fiery</dc:creator>
    <dc:date>2018-02-07T15:29:31Z</dc:date>
    <item>
      <title>Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434875#M107965</link>
      <description>&lt;P&gt;I am new to SAS, I came cross this question online, I see 2 DO loop statements here, but there is only one "End" statement. Shouldn't it include 2 "End" statements, one for each DO loop? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18371iC7FFBE1FEEA7821B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434875#M107965</guid>
      <dc:creator>Fiery</dc:creator>
      <dc:date>2018-02-07T14:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434881#M107967</link>
      <description>&lt;P&gt;You are correct. The program will give a syntax error unless it has two END statements.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434881#M107967</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-02-07T14:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434887#M107970</link>
      <description>&lt;P&gt;Hi Rick, thanks for your reply. In this case, there should be no observation be written. right?&amp;nbsp; I would choose D as the answer.&amp;nbsp; But the system says the correct answer is C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434887#M107970</guid>
      <dc:creator>Fiery</dc:creator>
      <dc:date>2018-02-07T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434889#M107972</link>
      <description>&lt;P&gt;I think they are asking for the output IF the program was correctly written. In that&amp;nbsp;case, the correct answer is C because the last observation is written.&amp;nbsp; If you want all observations, put an OUTPUT statement inside the innermost loop.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434889#M107972</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-02-07T15:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434901#M107977</link>
      <description>&lt;P&gt;Rick, I agree with you. I think this question is to check if you know 'OUTPUT' statement. without the OUTPUT statement, it will only show the last observation.&amp;nbsp; However, for curiosity I tried to write this program in SAS, Log shows an Error and a Warning as I expected. &amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is a real exam, I will be confused, what is it trying to test us: OUTPUT statement or End statement.&amp;nbsp; I am having an exam next week, wish myself goodluck. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18373i356B75DC1D297C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434901#M107977</guid>
      <dc:creator>Fiery</dc:creator>
      <dc:date>2018-02-07T15:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434906#M107978</link>
      <description>&lt;P&gt;Yes, I agree with you. The first task of the test creator is to make the question clear. The creator of this test did not proofread sufficiently. You have every right to feel confused and frustrated by this question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect and hope that&amp;nbsp;your test next week will be clearer. Best wishes for a successful exam!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434906#M107978</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-02-07T15:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434958#M107997</link>
      <description>&lt;P&gt;Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a good day!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 17:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/434958#M107997</guid>
      <dc:creator>Fiery</dc:creator>
      <dc:date>2018-02-07T17:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458711#M116433</link>
      <description>&lt;P&gt;Hello Rick,&lt;/P&gt;&lt;P&gt;So do you mean by default only the last observation is written unless you put a implicit output in the do end statement to list all loops?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 15:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458711#M116433</guid>
      <dc:creator>Karen_sas11</dc:creator>
      <dc:date>2018-04-30T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458729#M116437</link>
      <description>&lt;P&gt;By default, every DATA step contains an implicit OUTPUT statement at the end the step (just before the RUN statement). That is usually&amp;nbsp;what you want when the DATA step contains a SET statement or an INFILE statement or a DATALINES statement. However, this example does not contain&amp;nbsp;any of the usual&amp;nbsp;data input statements.&amp;nbsp;If you want to see each iteration of the DO loop, you should insert an OUTPUT statement at an appropriate location.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 16:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458729#M116437</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-30T16:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458743#M116441</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 16:47:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Loop/m-p/458743#M116441</guid>
      <dc:creator>Karen_sas11</dc:creator>
      <dc:date>2018-04-30T16:47:48Z</dc:date>
    </item>
  </channel>
</rss>

