<?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: Doubt in write a code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904486#M357355</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/433955"&gt;@Navaneethan6&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't understand your question.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2023 17:39:06 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-11-24T17:39:06Z</dc:date>
    <item>
      <title>Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904446#M357339</link>
      <description>&lt;P&gt;Hi Team, I am practicing for the SAS base certification I have a scenario question which share by friend, I start to write the program for that I can't understand some points in the question. could please help to understand that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;1. Create data set ‘scoredata0’ from importing the excel data ‘score_data_miss777’&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;2. In data step,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;a. create a new data set ‘scoredata1’ from ‘scoredata0’ using set statement&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;b. convert 777 in variables Score1,2,3 to missing (periods) using if… then … else statement&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;c. calculate average of scores using SAS function MEAN&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;&lt;FONT face="Calibri, sans-serif" size="2"&gt;d. using the calculated &lt;/FONT&gt;average score&lt;FONT face="Calibri, sans-serif" size="2"&gt;&amp;nbsp;to create Grade categories A, B, C, D, F&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#1C1D1F"&gt;&lt;FONT color="#1C1D1F"&gt;&lt;FONT face="Calibri, sans-serif" size="2"&gt;3. Print data ‘scoredata1’ using Proc&amp;nbsp;Print.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Calibri, sans-serif" size="2"&gt;I can't understand the option b and don't &lt;/FONT&gt;&lt;FONT face="Roboto" size="3"&gt;know&lt;/FONT&gt;&lt;FONT face="Calibri, sans-serif" size="2"&gt;&lt;FONT face="Roboto" size="3"&gt;&amp;nbsp;how to &lt;/FONT&gt;write&lt;FONT face="Roboto" size="3"&gt;&amp;nbsp;the code for option&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Roboto" size="3"&gt;d.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;code I&amp;nbsp;tried is below.&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;DIV&gt;proc import datafile="/home/u62129231/EPG1V2/SAS P 1/score_data_miss777.xlsx"&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dbms=xlsx out=scoredata0 replace;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data scoredata1;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;set work.scoredata0;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if score1=. then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;do;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;score1=777;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if score2=. then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;do;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;score2=777;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if score3=. then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;do;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;score3=777;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc means data=scoredata1;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc print data=scoredata1;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;FONT color="#1C1D1F"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 10:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904446#M357339</guid>
      <dc:creator>Navaneethan6</dc:creator>
      <dc:date>2023-11-24T10:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904449#M357340</link>
      <description>&lt;P&gt;Your code does not do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Calibri,sans-serif" size="2"&gt;&lt;SPAN&gt;&lt;FONT face="Roboto" size="3" color="#1C1D1F"&gt;convert 777 in variables Score1,2,3 to missing (periods) using if… then … else statement&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead it does things the other way around, it converts missing to 777.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 10:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904449#M357340</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-24T10:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904462#M357342</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&lt;FONT color="#1C1D1F"&gt;"c. calculate average of scores using SAS function MEAN"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&lt;FONT color="#1C1D1F"&gt;&amp;gt;&amp;gt; you need to use the mean-function inside the data step, not the mean procedure&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;"d. &lt;FONT color="#1C1D1F"&gt;using the calculated average score&amp;nbsp;to create Grade categories A, B, C, D, F"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#1C1D1F"&gt;&amp;gt;&amp;gt; hardly possible without knowing which score to map to which letter. With the information a format or if-then-else could be used or a select-block.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 11:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904462#M357342</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-11-24T11:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904464#M357343</link>
      <description>&lt;P&gt;Is Now my code is correct ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile="/home/u62129231/EPG1V2/SAS P 1/score_data_miss777.xlsx"&lt;BR /&gt;dbms=xlsx out=scoredata0 replace;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data scoredata1;&lt;BR /&gt;set work.scoredata0;&lt;BR /&gt;&lt;BR /&gt;if score1=777 then&lt;BR /&gt;do;&lt;BR /&gt;score1=.;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if score2=777 then&lt;BR /&gt;do;&lt;BR /&gt;score2=.;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if score3=777 then&lt;BR /&gt;do;&lt;BR /&gt;score3=.;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc means data=scoredata1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print data=scoredata1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 12:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904464#M357343</guid>
      <dc:creator>Navaneethan6</dc:creator>
      <dc:date>2023-11-24T12:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904469#M357344</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/433955"&gt;@Navaneethan6&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is Now my code is correct ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Test it yourself.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 13:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904469#M357344</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-24T13:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904476#M357350</link>
      <description>&lt;P&gt;Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 16:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904476#M357350</guid>
      <dc:creator>Navaneethan6</dc:creator>
      <dc:date>2023-11-24T16:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904486#M357355</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/433955"&gt;@Navaneethan6&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't understand your question.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 17:39:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904486#M357355</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-24T17:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904487#M357356</link>
      <description>&lt;P&gt;I think that they want you to do 2a to 2d in a single data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also did they provide a rule for converting an average score into a letter grade?&amp;nbsp; What scores should considered an A? etc.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 17:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904487#M357356</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-24T17:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in write a code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904488#M357357</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/433955"&gt;@Navaneethan6&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yeah, I will definitely test the code, but I need to under the question. should I need to do those 777 values as missing values right?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Answer this question.&amp;nbsp; &amp;nbsp;When assigning letter grades do you use the class's average score? Or do you use the average score for an individual student in the class?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 17:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doubt-in-write-a-code/m-p/904488#M357357</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-24T17:52:41Z</dc:date>
    </item>
  </channel>
</rss>

