<?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: Receiving error: Array subscript out of range in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460444#M284665</link>
    <description>&lt;P&gt;Thank you!! You were right. It turned out that HALF had all missing variables. The variable names in a previous code didn't match what was supposed to be in this SAS code and thus HALF didn't get coded properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your prompt support!&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 14:45:25 GMT</pubDate>
    <dc:creator>ashaikh</dc:creator>
    <dc:date>2018-05-07T14:45:25Z</dc:date>
    <item>
      <title>Receiving error: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460425#M284663</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble debugging my error and could really use some help. Here is my code with the line numbers and I keep getting the error: Array subscript out of range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2060 data prescribercount (keep=patientid prescribers1 prescribers2);&lt;BR /&gt;2061 set prescriptions1;&lt;BR /&gt;2062 by patientid half prescriber;&lt;BR /&gt;2063 array prescribers(2) prescribers1 prescribers2;&lt;BR /&gt;2064 retain prescribers1-prescribers2 0;&lt;BR /&gt;2065 if first.prescriber then prescribers(half)=prescribers(half)+1;&lt;BR /&gt;2066 else if last.patientid then do;&lt;BR /&gt;2067 output;&lt;BR /&gt;2068 prescribers1=0;&lt;BR /&gt;2069 prescribers2=0;&lt;BR /&gt;2070 end;&lt;BR /&gt;2071 run;&lt;/P&gt;&lt;P&gt;ERROR: Array subscript out of range at line 2065 column 44.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would really appreciate insights.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 14:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460425#M284663</guid>
      <dc:creator>ashaikh</dc:creator>
      <dc:date>2018-05-07T14:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving error: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460429#M284664</link>
      <description>&lt;P&gt;What values does your variable HALF take on?&lt;/P&gt;
&lt;P&gt;Your array definition sets the array to only accept 1 and 2. If half ever has any other value that will cause the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run proc freq on the input data set and the variable Half to confirm what you might believe.&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 14:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460429#M284664</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-07T14:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving error: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460444#M284665</link>
      <description>&lt;P&gt;Thank you!! You were right. It turned out that HALF had all missing variables. The variable names in a previous code didn't match what was supposed to be in this SAS code and thus HALF didn't get coded properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your prompt support!&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 14:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Receiving-error-Array-subscript-out-of-range/m-p/460444#M284665</guid>
      <dc:creator>ashaikh</dc:creator>
      <dc:date>2018-05-07T14:45:25Z</dc:date>
    </item>
  </channel>
</rss>

