<?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 Opportunity for Improvement: SAS® Programming 2: Data Manipulation Techniques Lesson 2: Challenge in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Opportunity-for-Improvement-SAS-Programming-2-Data-Manipulation/m-p/960563#M1530</link>
    <description>&lt;P&gt;Opportunity for Improvement:&lt;/P&gt;
&lt;P&gt;1) Add Proc Sort instructions as part of the instructions.&amp;nbsp; Just to keep in consistency with the previous Practices/Assignment/Challenges&amp;nbsp;&lt;STRONG&gt;OR&amp;nbsp;&lt;/STRONG&gt; add "When sorting the data, keep only the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Region&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ParkName&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;State&lt;/STRONG&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;GrossAcres&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns." higher up on the list of instructions, instead of after "Write a DATA step..."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Include as an alternative solution for Question 2.&lt;/P&gt;
&lt;LI-SPOILER&gt;proc freq data=singlestate;&lt;BR /&gt;run;&lt;/LI-SPOILER&gt;
&lt;P&gt;Include as an alternative solution for Question 3.&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;proc print data=multistate;&lt;BR /&gt;Where upcase(ParkName)= 'HOVENWEEP NM';&lt;BR /&gt;run;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 22:35:42 GMT</pubDate>
    <dc:creator>coder1234</dc:creator>
    <dc:date>2025-02-28T22:35:42Z</dc:date>
    <item>
      <title>Opportunity for Improvement: SAS® Programming 2: Data Manipulation Techniques Lesson 2: Challenge</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Opportunity-for-Improvement-SAS-Programming-2-Data-Manipulation/m-p/960563#M1530</link>
      <description>&lt;P&gt;Opportunity for Improvement:&lt;/P&gt;
&lt;P&gt;1) Add Proc Sort instructions as part of the instructions.&amp;nbsp; Just to keep in consistency with the previous Practices/Assignment/Challenges&amp;nbsp;&lt;STRONG&gt;OR&amp;nbsp;&lt;/STRONG&gt; add "When sorting the data, keep only the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Region&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ParkName&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;State&lt;/STRONG&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;GrossAcres&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns." higher up on the list of instructions, instead of after "Write a DATA step..."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Include as an alternative solution for Question 2.&lt;/P&gt;
&lt;LI-SPOILER&gt;proc freq data=singlestate;&lt;BR /&gt;run;&lt;/LI-SPOILER&gt;
&lt;P&gt;Include as an alternative solution for Question 3.&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;proc print data=multistate;&lt;BR /&gt;Where upcase(ParkName)= 'HOVENWEEP NM';&lt;BR /&gt;run;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 22:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Opportunity-for-Improvement-SAS-Programming-2-Data-Manipulation/m-p/960563#M1530</guid>
      <dc:creator>coder1234</dc:creator>
      <dc:date>2025-02-28T22:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Opportunity for Improvement: SAS® Programming 2: Data Manipulation Techniques Lesson 2: Challeng</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Opportunity-for-Improvement-SAS-Programming-2-Data-Manipulation/m-p/960677#M1531</link>
      <description>&lt;P&gt;Thanks for taking the time to suggest improvements to the final Challenge problem in Lesson 2 of the SAS® Programming 2 course!&lt;BR /&gt;&lt;BR /&gt;Question 2 reads: "&lt;SPAN&gt;How many rows are in the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;singlestate&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;table?"&lt;/SPAN&gt;&lt;BR /&gt;I personally feel that adding a PROC FREQ step to the solutions to question 2 is inefficient. The PROC FREQ output itself doesn't provide an easy answer to the question, and if you're using the row count reported in the log for PROC FREQ, it's the same as that reported in the log after the DATA step finished processing - so it's just as easy, and more efficient, to grab it from the DATA step log.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Question 3 reads: "&lt;SPAN&gt;In the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;multistate&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;table, in which two states does the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Hovenweep NM&lt;/EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;value appear for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ParkName&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;And I &lt;EM&gt;really&lt;/EM&gt; &lt;EM&gt;like&lt;/EM&gt; your suggested addition for the question #3 solution. Using PROC PRINT with a WHERE clause is a nice programmatic approach and avoids having to page through the data in the viewer while searching visually for the answer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have fun with the rest of the course!&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2025 17:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Opportunity-for-Improvement-SAS-Programming-2-Data-Manipulation/m-p/960677#M1531</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2025-03-02T17:26:03Z</dc:date>
    </item>
  </channel>
</rss>

