<?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: Lesson 1 Essentials - Activity p101a03.sas - Second question in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/885172#M1399</link>
    <description>Thank so much Cynthia,&lt;BR /&gt;&lt;BR /&gt;All the information that you share with me is really interesting and help me to understand better.&lt;BR /&gt;When I did the activity I forgot what we read in the lesson about the end proc, I did not pay attention to the keyword “run”. And forgot too, about the global statements are not in the Data o Pront Steps. But for sure I will never forget.&lt;BR /&gt;Maybe it is not so important, but I am new on SAS programming, so for me is nice to discover my mistakes.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Nelly.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Jul 2023 20:56:30 GMT</pubDate>
    <dc:creator>Nellysas</dc:creator>
    <dc:date>2023-07-17T20:56:30Z</dc:date>
    <item>
      <title>Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884942#M1393</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just did the activity and I have a doubt in question number 2 :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2) How many statements are in the proc print step?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The correct answer is four, but I find 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-16 at 19.31.42.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85806iD0ABFC814A57E8A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-07-16 at 19.31.42.png" alt="Screenshot 2023-07-16 at 19.31.42.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the statement proc print&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the statement var&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the statement "where" like a assignment statement&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the statement run&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and the global statement title&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I am wrong and I have confused "where" like a statement, I will thank an answer to clarify me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much,&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 18:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884942#M1393</guid>
      <dc:creator>Nellysas</dc:creator>
      <dc:date>2023-07-16T18:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884949#M1394</link>
      <description>&lt;P&gt;I guess I see 4 statements, the title statement is not "in the proc print step" which ends at &lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 20:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884949#M1394</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-16T20:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884970#M1395</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Question 3 in that same activity is going to ask students about Global statements. That's where they can count the TITLE statement. The point of this activity is to get the students to identify global versus regular statements and to recognize step boundaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My take on your thought exercise, if the TITLE statement were inside the PROC PRINT, I would say that there are still 4 PROC PRINT statements and 1 global statement that has been placed INSIDE the PROC PRINT step. But, in the activity program, we want the students to start learning how to read the program -- how to identify the steps, how to identify step boundaries and global statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The lecture immediately before that activity is explaining SAS program structure and what a program "step" is. The lecture covers how a "step" is composed of statements and typically ends with a RUN or QUIT statement. The lecture explains that a SAS program can also contain global statements (like TITLE or FOOTNOTE or LIBNAME,etc) which do not end with a RUN or QUIT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The program for the activity looks like this (I've added the color coding):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1689541802109.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85809iB98F25ADC4907759/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1689541802109.png" alt="Cynthia_sas_0-1689541802109.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; But why bother with the emphasis on global statements at all? What if the PROC PRINT statement was as you coded it, but there was not any TITLE statement before the PROC MEANS? A new SAS programmer might not expect these results from the changed program:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1689542385691.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85810i54180585ED9575EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1689542385691.png" alt="Cynthia_sas_1-1689542385691.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The TITLE statement is still a GLOBAL statement whether it is placed inside or outside of the PROC step where it is used. One of the reasons our programs always show the TITLE and FOOTNOTE statements placed immediately BEFORE the PROC statement in our starter programs is so students get into the habit of thinking first about the global statements, such as OPTIONS, LIBNAME and TITLE and FOOTNOTE, that their steps will need to have in effect before the step runs.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 21:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884970#M1395</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-07-16T21:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884971#M1396</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question 3 in that same activity is going to ask students about Global statements. That's where they can count the TITLE statement. The point of this activity is to get the students to identify global versus regular statements and to recognize step boundaries.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is not WHERE a global statement? It is not listed under the PROC PRINT documentation, so wouldn't that mean it is not a PROC PRINT statement? But really, this is splitting hairs to a degree that doesn't seem to be relevant to testing beginners about SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Isn't the concept that the question is trying to get at that PROC PRINT ends with the &lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt; statement?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 21:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884971#M1396</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-16T21:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884980#M1397</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The WHERE statement is&amp;nbsp; not a global statement. Here's the page for Global Statements:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n0e7kamd4b486zn10o4lcseg4qvd.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n0e7kamd4b486zn10o4lcseg4qvd.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE is a flexible statement, documented in the DATA step syntax,&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1xbr9r0s9veq0n137iftzxq4g7e.htm#n0gcjivvzd7mown1nghhoukvf56l" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1xbr9r0s9veq0n137iftzxq4g7e.htm#n0gcjivvzd7mown1nghhoukvf56l&lt;/A&gt;&amp;nbsp; but with the extra information that it can be used with any procedure that reads data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1689558861630.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85811iC8C74F487F92A3B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1689558861630.png" alt="Cynthia_sas_0-1689558861630.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the context of the program for that activity, I would consider WHERE to be a statement that "belongs" to PROC PRINT syntax in that example, in a way that is different from the TITLE statement or other GLOBAL statements. The WHERE statement has to be used somewhere -- inside a DATA step or a PROC STEP. The WHERE statement can't be used in the same way that a TITLE, FOOTNOTE, OPTIONS or other global statement can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; But you're right, to a certain extent, this is splitting hairs. Yes, one of the goals was to have the student recognize that the RUN; ends the PROC PRINT and the PROC MEANS and the DATA step in this activity. But one of the other goals was to have them recognize that the TITLE statements are GLOBAL statements that do not need a RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 01:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/884980#M1397</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-07-17T01:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/885169#M1398</link>
      <description>Thanks so much for your answer, now I got it. Title is not a statement in the Proc print step, you are right.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jul 2023 20:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/885169#M1398</guid>
      <dc:creator>Nellysas</dc:creator>
      <dc:date>2023-07-17T20:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lesson 1 Essentials - Activity p101a03.sas - Second question</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/885172#M1399</link>
      <description>Thank so much Cynthia,&lt;BR /&gt;&lt;BR /&gt;All the information that you share with me is really interesting and help me to understand better.&lt;BR /&gt;When I did the activity I forgot what we read in the lesson about the end proc, I did not pay attention to the keyword “run”. And forgot too, about the global statements are not in the Data o Pront Steps. But for sure I will never forget.&lt;BR /&gt;Maybe it is not so important, but I am new on SAS programming, so for me is nice to discover my mistakes.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Nelly.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jul 2023 20:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Lesson-1-Essentials-Activity-p101a03-sas-Second-question/m-p/885172#M1399</guid>
      <dc:creator>Nellysas</dc:creator>
      <dc:date>2023-07-17T20:56:30Z</dc:date>
    </item>
  </channel>
</rss>

