<?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 Code Help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71875#M20780</link>
    <description>Thanks so much Linus!  This worked and helped me out a great deal.  I do have one more question.  Some of the Names have blank results for all tests.  I need those to say "Fail".  Can this program be modified to fill in those blank results as well?  &lt;BR /&gt;
&lt;BR /&gt;
Thanks again&lt;BR /&gt;
Jimmy</description>
    <pubDate>Fri, 30 Jan 2009 16:46:56 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-01-30T16:46:56Z</dc:date>
    <item>
      <title>SAS Code Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71873#M20778</link>
      <description>I am relatively new to SAS, and was hoping someone could help me.&lt;BR /&gt;
&lt;BR /&gt;
I have the following variables--Name, Test, and Result in a spreadsheet that looks similar to this:&lt;BR /&gt;
&lt;BR /&gt;
Name           Test              Result         &lt;BR /&gt;
John Doe       Math              Pass&lt;BR /&gt;
John Doe       English   &lt;BR /&gt;
John Doe       History   &lt;BR /&gt;
&lt;BR /&gt;
The results for English  and History are blank.  I need them to say "Pass" as well.  If any of John's test results say "Pass", then any test that has a blank result must also say "Pass". The same applies if one of his test results were to say "Fail".&lt;BR /&gt;
&lt;BR /&gt;
The spreadsheet has a list of different names with many tests and results, and each name is listed several times for each test.  The results for each exam should all be made the same for each person.&lt;BR /&gt;
&lt;BR /&gt;
Can someone please give me an example of the SAS code I need to use to fill on the blanks on the spreadsheet?  Thanks so much.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: State2000&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: State2000

Message was edited by: State2000</description>
      <pubDate>Fri, 30 Jan 2009 04:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71873#M20778</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-30T04:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71874#M20779</link>
      <description>This code assumes that you have managed to import your spreadsheet to SAS. It also assumes that you don't have mixture of Pass and Fail for the same student. If this is the case, you have to develop the logic a bit in the data step.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=exams;&lt;BR /&gt;
	by name descending result ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data exams2;&lt;BR /&gt;
	set exams;&lt;BR /&gt;
	by name;&lt;BR /&gt;
	retain res;&lt;BR /&gt;
	if first.name then res=result;&lt;BR /&gt;
	else if result = ' ' then result = res;&lt;BR /&gt;
	drop res;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps,&lt;BR /&gt;
Linus</description>
      <pubDate>Fri, 30 Jan 2009 08:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71874#M20779</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-01-30T08:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71875#M20780</link>
      <description>Thanks so much Linus!  This worked and helped me out a great deal.  I do have one more question.  Some of the Names have blank results for all tests.  I need those to say "Fail".  Can this program be modified to fill in those blank results as well?  &lt;BR /&gt;
&lt;BR /&gt;
Thanks again&lt;BR /&gt;
Jimmy</description>
      <pubDate>Fri, 30 Jan 2009 16:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71875#M20780</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-30T16:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71876#M20781</link>
      <description>Well, yes. After the sort, you will know on the first observation per student, because Fail will be sorted before a blank (descending):&lt;BR /&gt;
&lt;BR /&gt;
data exams2;&lt;BR /&gt;
set exams;&lt;BR /&gt;
by name;&lt;BR /&gt;
retain res;&lt;BR /&gt;
if first.name then &lt;B&gt;do;&lt;BR /&gt;
if result eq ' ' then result = 'Fail';&lt;/B&gt;&lt;BR /&gt;
res=result;&lt;BR /&gt;
&lt;B&gt;end;&lt;/B&gt;&lt;BR /&gt;
else if result = ' ' then result = res;&lt;BR /&gt;
drop res;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Fri, 30 Jan 2009 17:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71876#M20781</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-01-30T17:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71877#M20782</link>
      <description>Thanks again, I appreciate your help</description>
      <pubDate>Sun, 01 Feb 2009 04:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Code-Help/m-p/71877#M20782</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-01T04:27:35Z</dc:date>
    </item>
  </channel>
</rss>

