<?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: SAS problem solving skill in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403305#M278911</link>
    <description>&lt;P&gt;Answer questions on here and StackOveflow. You're not going to get a better sample of real world examples.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2017 18:39:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-10-11T18:39:51Z</dc:date>
    <item>
      <title>SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403302#M278910</link>
      <description>&lt;P&gt;Can anyone suggest any SAS book or online resources where I can practice problem solving ? I just want to work on my problem solving skills in SAS and most of the tutorials online only explains the syntax but not problem solving. For example:I found this problem online. And I want to work on more of these. Any guideline will be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below code is given&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; %macro subset( cust=);

  proc print data= feedback;

  where customer = "&amp;amp;cust";

  run;

%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the question-&lt;/P&gt;&lt;P&gt;Write a program that will programmatically call &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Lucida Console';"&gt;%subset&lt;/SPAN&gt;&lt;/STRONG&gt; for each &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Lucida Console';"&gt;customer&lt;/SPAN&gt;&lt;/STRONG&gt; value in&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Lucida Console';"&gt;Feedback&lt;/SPAN&gt;&lt;/STRONG&gt;.&amp;nbsp; Note that we do not know how many unique values of&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Lucida Console';"&gt;customer&lt;/SPAN&gt;&lt;/STRONG&gt; there are in the data set.&amp;nbsp; Also, you cannot modify the macro &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Lucida Console';"&gt;%subset&lt;/SPAN&gt;&lt;/STRONG&gt; itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-10-11 at 2.22.21 PM.png" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15799i524DBC5EC897AD97/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-10-11 at 2.22.21 PM.png" alt="Screen Shot 2017-10-11 at 2.22.21 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403302#M278910</guid>
      <dc:creator>shihabur</dc:creator>
      <dc:date>2017-10-11T18:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403305#M278911</link>
      <description>&lt;P&gt;Answer questions on here and StackOveflow. You're not going to get a better sample of real world examples.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 18:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403305#M278911</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-11T18:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403327#M278912</link>
      <description>&lt;P&gt;Exactly what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;said. Solve problems presented here (you don't need to post, just create a solution for yourself), and then compare your solution to those that people like &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;and other senior posters come up with. Often you'll be surprised and learn something new.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 19:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403327#M278912</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-11T19:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403332#M278913</link>
      <description>&lt;P&gt;Answer problems in the various communities and practice using the SAS documentation to do so &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 19:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403332#M278913</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-10-11T19:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403374#M278914</link>
      <description>&lt;P&gt;I think I can interpret your example problem in more than one way. Input is only half the problem, if that much. Knowing exactly what the desired output should be is very important in the general&amp;nbsp; problem solving process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, one solution to print groups of records for each customer does not involve your macro at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc sort data=feedback;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by customer;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=feedback;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by customer;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So there isn't sufficient reason&amp;nbsp;provided why a BY group solution would not work for that problem.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 21:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403374#M278914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-11T21:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403397#M278915</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110059"&gt;@shihabur&lt;/a&gt;,&amp;nbsp;I'm curious where you found this particular question, as it has made &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Macro-help/td-p/383385" target="_self"&gt;an appearance here before&lt;/A&gt;.&amp;nbsp; I agree with ballardw that it seems contrived -- why use a macro?&amp;nbsp; Goes against one of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;'s famous maxims.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But beyond that, I love the advice of the responders so far.&amp;nbsp; I often try out the solutions that these experts share here -- it helps me to learn too.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 00:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403397#M278915</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-10-12T00:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403423#M278916</link>
      <description>&lt;P&gt;Frankly speaking, I was asked to solve this as a problem. No idea if its from a book or if someone made it up. I wasn't looking for solution here. Rather trying to learn the thought process behind problem solving. Anyways, now that ballardw explained, it seems this is not even a good problem to begin with. I will try to follow the suggestions given here.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 02:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403423#M278916</guid>
      <dc:creator>shihabur</dc:creator>
      <dc:date>2017-10-12T02:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403460#M278917</link>
      <description>&lt;P&gt;So you have a macro that accepts a single input parameter, and you want to run that macro for each value given in a dataset, where values can occur multiple times&lt;/P&gt;
&lt;P&gt;- step one: get a list of values without duplicates; can be done with sort nodupkey, or select distinct in SQL&lt;/P&gt;
&lt;P&gt;- step two: call your macro off that list; this is best done with call execute()&lt;/P&gt;
&lt;P&gt;Hint: lists are best kept in datasets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I had no idea about call execute() before I ran into the SAS Communities. It is simply not covered in the standard SAS programming courses (at least it was not in the five weeks I did when I started with SAS in '98/'99)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 07:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/403460#M278917</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-12T07:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS problem solving skill</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/515567#M278918</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;set feedback;&lt;BR /&gt;i=_n_;&lt;BR /&gt;for j=1 to i do;&lt;BR /&gt;call execute(%subset(cust = customer);&lt;BR /&gt;Run;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 14:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-problem-solving-skill/m-p/515567#M278918</guid>
      <dc:creator>Amrita_abc</dc:creator>
      <dc:date>2018-11-23T14:58:27Z</dc:date>
    </item>
  </channel>
</rss>

