<?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 Help! How to run some calculations... in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245875#M45926</link>
    <description>&lt;P&gt;First of all, your code yields a single error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR 68-185: The function A is unknown, or cannot be accessed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;telling us that A() needs to be defined. Should it be an array, or is it a function defined elsewhere?&lt;/P&gt;
&lt;P&gt;If it is a SAS array, it needs to be defined; it is also better to enclose the subscript in {}, making this more readable and clearer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once this is resolved, you will get a NOTE: about x being unitialized, which will cause the condition 1 &amp;lt; x &amp;lt; 6 to always be false, so your data step won't do anything at all (besides counting y to 300). B and i will stay missing in the dataset A.&lt;/P&gt;
&lt;P&gt;So, where does x come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And what is the purpose of all this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2016 13:59:38 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-01-25T13:59:38Z</dc:date>
    <item>
      <title>SAS Help! How to run some calculations...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245842#M45914</link>
      <description>&lt;P&gt;Hi, I need help running this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data A;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do y=1 to 300;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if y &amp;lt; 5 and (1&amp;lt;x&amp;lt;6) then do;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do i=1 to 7;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do while (y-i&amp;gt;0);&lt;/P&gt;&lt;P&gt;B=(1-A(y-i));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;output;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I already have values for A(y) i.e. A(1), A(2),...A(300)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. if y=4 then B= (1-A(4-1))*(1-A(4-2))*(1-A(4-3))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 10:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245842#M45914</guid>
      <dc:creator>sasbeginner</dc:creator>
      <dc:date>2016-01-25T10:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Help! How to run some calculations...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245848#M45915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post some test data in the form of a datastep, and what the output should look like. &amp;nbsp;I am not following you at all. &amp;nbsp;Where does the variable X come into this, as its not described or set anywhere? &amp;nbsp;Why the output statement at the end, its not needed. &amp;nbsp;I assume a() is an array, what does the array define? &amp;nbsp;Test data really helps.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 10:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245848#M45915</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-25T10:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Help! How to run some calculations...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245875#M45926</link>
      <description>&lt;P&gt;First of all, your code yields a single error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR 68-185: The function A is unknown, or cannot be accessed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;telling us that A() needs to be defined. Should it be an array, or is it a function defined elsewhere?&lt;/P&gt;
&lt;P&gt;If it is a SAS array, it needs to be defined; it is also better to enclose the subscript in {}, making this more readable and clearer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once this is resolved, you will get a NOTE: about x being unitialized, which will cause the condition 1 &amp;lt; x &amp;lt; 6 to always be false, so your data step won't do anything at all (besides counting y to 300). B and i will stay missing in the dataset A.&lt;/P&gt;
&lt;P&gt;So, where does x come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And what is the purpose of all this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2016 13:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Help-How-to-run-some-calculations/m-p/245875#M45926</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-25T13:59:38Z</dc:date>
    </item>
  </channel>
</rss>

