<?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: Basic SAS program in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Basic-SAS-program/m-p/568162#M11625</link>
    <description>&lt;P&gt;Instead of&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(english + math + history +science)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum(english,math,history,science)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and you will only get a missing value if&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; values are missing.&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jun 2019 21:18:13 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-06-22T21:18:13Z</dc:date>
    <item>
      <title>Basic SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Basic-SAS-program/m-p/568161#M11624</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="D5.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30470iACDA09395AC2E052/image-size/large?v=v2&amp;amp;px=999" role="button" title="D5.png" alt="D5.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="D6.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30471i5D32C63AAFDEA928/image-size/large?v=v2&amp;amp;px=999" role="button" title="D6.png" alt="D6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am trying some very basic SAS programs. It calculates the average of scores obtained in 4 subjects. One of the scores is missing in an observation and hence the average is not getting calculated. How do I overcome this?&lt;/P&gt;&lt;P&gt;I have attached a screenshot of my code and output. It is extremely simple. Kindly help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data scores;
infile "/folders/myfolders/71442_example/scores.txt";
input gender $ english 
math 
history 
science;
avg = (english + math + history +science)/4;
run;

proc print data=scores;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the data:&lt;/P&gt;&lt;P&gt;M 80 82 85 88&lt;/P&gt;&lt;P&gt;F 94 92 88 96&lt;/P&gt;&lt;P&gt;M 96 88 89 92&lt;/P&gt;&lt;P&gt;F 95 . 92 92&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2019 21:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Basic-SAS-program/m-p/568161#M11624</guid>
      <dc:creator>cy_th</dc:creator>
      <dc:date>2019-06-22T21:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Basic SAS program</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Basic-SAS-program/m-p/568162#M11625</link>
      <description>&lt;P&gt;Instead of&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(english + math + history +science)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum(english,math,history,science)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and you will only get a missing value if&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; values are missing.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2019 21:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Basic-SAS-program/m-p/568162#M11625</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-22T21:18:13Z</dc:date>
    </item>
  </channel>
</rss>

