<?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: Need assistance in a SAS Program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96065#M257738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very for you info and advises. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2012 02:51:22 GMT</pubDate>
    <dc:creator>SamLiya</dc:creator>
    <dc:date>2012-04-27T02:51:22Z</dc:date>
    <item>
      <title>Need assistance in a SAS Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96063#M257736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need assistance in the following code as I need to understand it and I'm not sure whether it fully correct, at the 1st place as log states ERROR in certain parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data marks;&lt;/P&gt;&lt;P&gt;retain key1 - key10;&lt;/P&gt;&lt;P&gt;array key{*} key1 - key10;&lt;/P&gt;&lt;P&gt;array ans{*} ans1 - ans10;&lt;/P&gt;&lt;P&gt;array s{*} s1 - s10;&lt;/P&gt;&lt;P&gt;if _n_ = 1 then do;&lt;/P&gt;&lt;P&gt;input @ 11 (key1 - key10) (1.);&lt;/P&gt;&lt;P&gt;delete; end;&lt;/P&gt;&lt;P&gt;else do; input id 1-10 (ans1 - ans10)(1.);&lt;/P&gt;&lt;P&gt;do I = 1 to 10;&lt;/P&gt;&lt;P&gt;if key {I} = ans{I} then S{I}=1;&lt;/P&gt;&lt;P&gt;else S{I} = 0; end;&lt;/P&gt;&lt;P&gt;row = sum(of s1-s10);&lt;/P&gt;&lt;P&gt;percent = 100*row/10;&lt;/P&gt;&lt;P&gt;drop I Key1-key10;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;format id ssn11;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;anskey 3 4 5 6 7 8 9 5 4 2&lt;/P&gt;&lt;P&gt;1 2 5 7 8 9 6 4 5 1 2 1&lt;/P&gt;&lt;P&gt;2 3 5 4 7 8 9 6 5 7 4 1&lt;/P&gt;&lt;P&gt;3 8 5 2 3 6 4 1 2 5 4 7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc sort; by id;&lt;/P&gt;&lt;P&gt;proc print; id id;&lt;/P&gt;&lt;P&gt;var row percent;&lt;/P&gt;&lt;P&gt;proc chart;&lt;/P&gt;&lt;P&gt;vbar percent/midpoints = 50 to 100 by 5;&lt;/P&gt;&lt;P&gt;proc freq;&lt;/P&gt;&lt;P&gt;tables ans1-ans10;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 17:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96063#M257736</guid>
      <dc:creator>SamLiya</dc:creator>
      <dc:date>2012-04-26T17:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need assistance in a SAS Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96064#M257737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid you have a lot of work ahead of you, to be able to understand this program.&amp;nbsp; I can tell you that without even looking at the program itself, just based on your first sentence.&amp;nbsp; You should be 100% sure that the program is incorrect, if you are receiving ERROR messages.&amp;nbsp; And you should know that it would be helpful for us to see what the error messages are, to help fix the program.&amp;nbsp; You can learn what you need, but you have some work ahead of you to learn it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, a couple of things stand out.&amp;nbsp; In the FORMAT statement, there should be a "dot" at the end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format id ssn11.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "dot" lets SAS distinguish that ssn11. is the name of a format, not the name of a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The major issue in this program is that the INPUT statements do not match the data following your CARDS statement.&amp;nbsp; The INPUT statements are the instructions on what data to read in, and where to find it.&amp;nbsp; You'll need to learn the meaning of every piece of every INPUT statement in the program, and make sure it matches the data you are trying to read.&amp;nbsp; (It is possible that you just typed in a few lines of data to illustrate, and that the "real" data has a different structure ... it's hard to tell from what you posted.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the right structure to the data, this program is very close to working.&amp;nbsp; But understanding why that is so will take some work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 18:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96064#M257737</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-26T18:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need assistance in a SAS Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96065#M257738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very for you info and advises. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 02:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-in-a-SAS-Program/m-p/96065#M257738</guid>
      <dc:creator>SamLiya</dc:creator>
      <dc:date>2012-04-27T02:51:22Z</dc:date>
    </item>
  </channel>
</rss>

