<?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: Wrong answer in a programming question in model Base sas certification exam in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879547#M347478</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442660"&gt;@Uma_Devi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can I send you the input dataset? No all the observations had upper case observations in the country variable.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the code you show the only other concern the Country variable might have is leading spaces.&lt;/P&gt;
&lt;P&gt;I asked about whether the State variable might also have separate case because it is used in the Proc Sort code (I am assuming the other variables were numeric in the sort By statement). If a State has values like "AK" "Ak" and "ak" the sort on state could have a different than expected sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version of the documents and data is important because if the answer key is for one version and the data you are using is from a different one than I would expect differences. Also, someone here may recognize that there was a problem with a specific release.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 14:07:02 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-06-07T14:07:02Z</dc:date>
    <item>
      <title>Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879474#M347435</link>
      <description>&lt;P&gt;The following the problem from the free model test paper of Base SAS certification exam and the code I wrote.The answer I get is not tallying with the right answer given:&lt;/P&gt;&lt;P&gt;This project will use data set cert.input27. At any time, you may save your program as program27 in cert\programs. You will use this program in the next project.&lt;BR /&gt;Write a SAS program that will:&lt;BR /&gt;o Create output data set results.output27a as a subset of cert.input27 where the country variable's value is "US" (any variation of case, such as US or us).&lt;BR /&gt;o Sort results.output27a:&lt;BR /&gt;&amp;nbsp;first by the variable state in ascending order&lt;BR /&gt;&amp;nbsp;then by Postal_Code in descending order&lt;BR /&gt;&amp;nbsp;and finally by employee_ID in ascending order.&lt;BR /&gt;Run the program and use the results to answer the question below.&lt;/P&gt;&lt;P&gt;1.What is the value of Employee_ID for observation 100 in results.output27a?&lt;BR /&gt;Right Answer given is : 120781&amp;nbsp; My answer is 121030. I checked for the employee_id 120781. It is not&amp;nbsp; there in the input27 dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you kindly explain.&lt;/P&gt;&lt;P&gt;The code I wrote :&lt;/P&gt;&lt;P&gt;Proc sort data = cert.input27 out= output27;&lt;BR /&gt;where upcase(country)='US';&lt;BR /&gt;by state descending postal_code employee_id;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=output27 (firstobs=100 obs=100);&lt;BR /&gt;var employee_id;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 03:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879474#M347435</guid>
      <dc:creator>Uma_Devi</dc:creator>
      <dc:date>2023-06-07T03:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879477#M347437</link>
      <description>&lt;P&gt;Without the original Cert.Input27 can't say.&lt;/P&gt;
&lt;P&gt;Could be a number of things: Different input data, different version of an answer key for the data provided, typo, some where you modified the Cert.Input27 data set prior to this exercise. Do you have version information for this practice and the key?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you check to see if any of the State values have different case?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 04:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879477#M347437</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-07T04:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879510#M347453</link>
      <description>&lt;P&gt;Can I send you the input dataset? No all the observations had upper case observations in the country variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 11:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879510#M347453</guid>
      <dc:creator>Uma_Devi</dc:creator>
      <dc:date>2023-06-07T11:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879547#M347478</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442660"&gt;@Uma_Devi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can I send you the input dataset? No all the observations had upper case observations in the country variable.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the code you show the only other concern the Country variable might have is leading spaces.&lt;/P&gt;
&lt;P&gt;I asked about whether the State variable might also have separate case because it is used in the Proc Sort code (I am assuming the other variables were numeric in the sort By statement). If a State has values like "AK" "Ak" and "ak" the sort on state could have a different than expected sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version of the documents and data is important because if the answer key is for one version and the data you are using is from a different one than I would expect differences. Also, someone here may recognize that there was a problem with a specific release.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879547#M347478</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-07T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879606#M347499</link>
      <description>&lt;P&gt;If the value they say is the right answer is not even in the input data then then input data is not what the question assumed it was.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible a mistake was made in creating the input data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 15:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879606#M347499</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-07T15:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879654#M347519</link>
      <description>I shall download the dataset again and try. If it is the same result as I get can I presume that the dataset used while giving the result in the exam is different from the one that is available now?</description>
      <pubDate>Wed, 07 Jun 2023 19:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879654#M347519</guid>
      <dc:creator>Uma_Devi</dc:creator>
      <dc:date>2023-06-07T19:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong answer in a programming question in model Base sas certification exam</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879694#M347537</link>
      <description>&lt;P&gt;I think the one error you made is that you did not save the generated data as RESULTS.OUTPUT27, but as WORK.OUTPUT27.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 06:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-answer-in-a-programming-question-in-model-Base-sas/m-p/879694#M347537</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2023-06-08T06:23:08Z</dc:date>
    </item>
  </channel>
</rss>

