<?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: why it is 2 and 7 ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808140#M318650</link>
    <description>&lt;P&gt;I don't see an "end"; I see a "stop".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why 2 and 7? ask the author. May be to show that if you use&lt;/P&gt;
&lt;PRE&gt;%let start = 1;
%let stop = 5;
&lt;/PRE&gt;
&lt;P&gt;It duplicates the output from the first data step and that changing the values changes the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Apr 2022 03:22:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-04-16T03:22:10Z</dc:date>
    <item>
      <title>why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808139#M318649</link>
      <description>&lt;P&gt;Rewrite the following program using %LET to assign the starting and ending values&lt;BR /&gt;of the DO loop to macro variables. Be sure these values also print in the PROC&lt;BR /&gt;PRINT output.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sqrt_table;
do n = 1 to 5;
Sqrt_n = sqrt(n);
output;
end;
run;
title "Square Root Table from 1 to 5";
proc print data=sqrt_table noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the following is the answer:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start = 2;
%let stop = 7;

data sqrt_table;
   do n = &amp;amp;start to &amp;amp;stop;
      Sqrt_n = sqrt(n);
      output;
   end;
run;

title "Square Root Table from &amp;amp;start to &amp;amp;stop";
proc print data=sqrt_table noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;why the 'start'=2 and 'end'=7 ?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 02:12:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808139#M318649</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-04-16T02:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808140#M318650</link>
      <description>&lt;P&gt;I don't see an "end"; I see a "stop".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why 2 and 7? ask the author. May be to show that if you use&lt;/P&gt;
&lt;PRE&gt;%let start = 1;
%let stop = 5;
&lt;/PRE&gt;
&lt;P&gt;It duplicates the output from the first data step and that changing the values changes the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 03:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808140#M318650</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-16T03:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808152#M318654</link>
      <description>&lt;P&gt;Don't doubt yourself. If the first program you post is correct, then you can duplicate it by using the second DATA step and&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;%let start = 1;
%let stop = 5;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 10:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808152#M318654</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-16T10:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808165#M318660</link>
      <description>sorry , it is 'stop' instead of 'end'.</description>
      <pubDate>Sat, 16 Apr 2022 13:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808165#M318660</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-04-16T13:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808166#M318661</link>
      <description>Thank you for your help.</description>
      <pubDate>Sat, 16 Apr 2022 13:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808166#M318661</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-04-16T13:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: why it is 2 and 7 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808167#M318662</link>
      <description>Thank you for your help ..</description>
      <pubDate>Sat, 16 Apr 2022 13:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-it-is-2-and-7/m-p/808167#M318662</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-04-16T13:19:58Z</dc:date>
    </item>
  </channel>
</rss>

