<?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: Could somebody translate the meaning of the array subscript range? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734633#M228825</link>
    <description>Okay, what youre saying kinda makes sense kinda doesn't....I'm just faking it til i make it with 3 weeks left in this insufferable class. I'm just not sure how this error is coming about as I used a format technique in the last assignment problem that worked just fine.&lt;BR /&gt;&lt;BR /&gt;ERROR: Array subscript out of range at line 91 column 15.&lt;BR /&gt;Customer_ID=5 Month1=213.1 Month2=. Month3=478 Month4=525.8 Month5=394.35 Month6=191.79 Over1=13.1 Over2=. Over3=178 Over4=425.8&lt;BR /&gt;Over5=294.35 Over6=-8.21 Total_Over=903.04 _I_=. _temporary_=200 i=2 _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;1 at 80:13&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 1 observations read from the data set BST5030.ORDERS_MIDYEAR.&lt;BR /&gt;WARNING: The data set WORK.PREFERRED_CUST may be incomplete. When this step was stopped there were 0 observations and 8 variables.&lt;BR /&gt;WARNING: Data set WORK.PREFERRED_CUST was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.02 seconds</description>
    <pubDate>Fri, 16 Apr 2021 03:34:42 GMT</pubDate>
    <dc:creator>FrustratedBio</dc:creator>
    <dc:date>2021-04-16T03:34:42Z</dc:date>
    <item>
      <title>Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734624#M228820</link>
      <description>&lt;P&gt;So below is the code that I am using. The part that I seem to be getting toruble from is array ov. When I run the program I get an error reading "&lt;SPAN&gt;ERROR: Array subscript out of range at line 91 column 15." I'm having a hard time underatanding what this means, and explanations that I have read online haven't really helped, so please explain in layman terms.&amp;nbsp;&lt;/SPAN&gt;&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;&lt;P&gt;libname bst5030 '/folders/myfolders/sasuser.v94/Data for classes 8 to 11 (2)';&lt;BR /&gt;data preferred_cust;&lt;BR /&gt;set bst5030.orders_midyear;&lt;/P&gt;&lt;P&gt;keep Customer_ID Over1-Over6 Total_Over;&lt;BR /&gt;array Mon{6} Month1-Month6;&lt;BR /&gt;Over1=Month1-200;&lt;BR /&gt;Over2=Month2-400;&lt;BR /&gt;Over3=Month3-300;&lt;BR /&gt;Over4=Month4-100;&lt;BR /&gt;Over5=Month5-100;&lt;BR /&gt;Over6=Month6-200;&lt;BR /&gt;Total_Over=sum(of Over1-Over6);&lt;/P&gt;&lt;P&gt;array Target _temporary_ (200, 400, 300, 100, 100, 200);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;array ov {6} Over1-Over6;&lt;BR /&gt;do i=1 to 6;&lt;BR /&gt;Ov{i}=Mon{i}-Target{i};&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;Total_Over=sum(of Over1-Over6);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc print data=preferred_cust noobs;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 03:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734624#M228820</guid>
      <dc:creator>FrustratedBio</dc:creator>
      <dc:date>2021-04-16T03:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734631#M228823</link>
      <description>&lt;P&gt;Look in the log at the value of variable &lt;FONT face="courier new,courier"&gt;I&lt;/FONT&gt; when this happens.&lt;/P&gt;
&lt;P&gt;It is probably not an integer between 1 and 6 as expected,&lt;/P&gt;
&lt;P&gt;Also note that you variable&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;Total_Over&amp;nbsp; is given a value twice; the&amp;nbsp;first&amp;nbsp;value will be discarded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Same for variables&amp;nbsp;&amp;nbsp;Over1-Over6.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 03:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734631#M228823</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-16T03:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734633#M228825</link>
      <description>Okay, what youre saying kinda makes sense kinda doesn't....I'm just faking it til i make it with 3 weeks left in this insufferable class. I'm just not sure how this error is coming about as I used a format technique in the last assignment problem that worked just fine.&lt;BR /&gt;&lt;BR /&gt;ERROR: Array subscript out of range at line 91 column 15.&lt;BR /&gt;Customer_ID=5 Month1=213.1 Month2=. Month3=478 Month4=525.8 Month5=394.35 Month6=191.79 Over1=13.1 Over2=. Over3=178 Over4=425.8&lt;BR /&gt;Over5=294.35 Over6=-8.21 Total_Over=903.04 _I_=. _temporary_=200 i=2 _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;1 at 80:13&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 1 observations read from the data set BST5030.ORDERS_MIDYEAR.&lt;BR /&gt;WARNING: The data set WORK.PREFERRED_CUST may be incomplete. When this step was stopped there were 0 observations and 8 variables.&lt;BR /&gt;WARNING: Data set WORK.PREFERRED_CUST was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.02 seconds</description>
      <pubDate>Fri, 16 Apr 2021 03:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734633#M228825</guid>
      <dc:creator>FrustratedBio</dc:creator>
      <dc:date>2021-04-16T03:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734642#M228831</link>
      <description>&lt;P&gt;Show the whole step's log please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can't see what lines 80 or 91 are.&lt;/P&gt;
&lt;P&gt;i=2 here, which is a value array index value.&lt;/P&gt;
&lt;P&gt;Have you fixed the other errors as per my comments?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 04:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734642#M228831</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-16T04:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734644#M228833</link>
      <description>&lt;P&gt;The first thing to do is read the error message. It tells you where it thinks the error is.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ERROR: Array subscript out of range at line 91 column 15.&lt;/PRE&gt;
&lt;P&gt;So look a the log and see which line is listed as line 91.&amp;nbsp; Then see what part of the line is the 15 character in the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also look at the variables and their values.&amp;nbsp; Did you notice you have defined a variable named _TEMPORARY_? Did you intend to do that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show more of the log, from the DATA statement to the errors and notes.&amp;nbsp; And use the Insert Code button when pasting or editing the text to preserve its formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 04:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734644#M228833</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-16T04:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734645#M228834</link>
      <description>1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;72&lt;BR /&gt;73 libname bst5030 '/folders/myfolders/sasuser.v94/Data for classes 8 to 11 (2)';&lt;BR /&gt;NOTE: Libref BST5030 refers to the same physical library as _TEMP0.&lt;BR /&gt;NOTE: Libref BST5030 was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: /folders/myfolders/sasuser.v94/Data for classes 8 to 11 (2)&lt;BR /&gt;74 data preferred_cust;&lt;BR /&gt;75 set bst5030.orders_midyear;&lt;BR /&gt;NOTE: Data file BST5030.ORDERS_MIDYEAR.DATA is in a format that is native to another host, or the file encoding does not match the&lt;BR /&gt;session encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;BR /&gt;performance.&lt;BR /&gt;76&lt;BR /&gt;77 keep Customer_ID Over1-Over6 Total_Over;&lt;BR /&gt;78 array Mon{6} Month1-Month6;&lt;BR /&gt;79 Over1=Month1-200;&lt;BR /&gt;80 Over2=Month2-400;&lt;BR /&gt;81 Over3=Month3-300;&lt;BR /&gt;82 Over4=Month4-100;&lt;BR /&gt;83 Over5=Month5-100;&lt;BR /&gt;84 Over6=Month6-200;&lt;BR /&gt;85&lt;BR /&gt;86 array Target _temporary_ (200, 400, 300, 100, 100, 200);&lt;BR /&gt;WARNING: Too many values for initialization of the array Target. Excess values are ignored.&lt;BR /&gt;87&lt;BR /&gt;88 array ov {6} Over1-Over6;&lt;BR /&gt;89 do i=1 to 6;&lt;BR /&gt;90 Ov{i}=Mon{i}-Target{i};&lt;BR /&gt;91 end;&lt;BR /&gt;92&lt;BR /&gt;93 Total_Over=sum(of Over1-Over6);&lt;BR /&gt;94 run;&lt;BR /&gt;&lt;BR /&gt;ERROR: Array subscript out of range at line 90 column 15.&lt;BR /&gt;Customer_ID=5 Month1=213.1 Month2=. Month3=478 Month4=525.8 Month5=394.35 Month6=191.79 Over1=13.1 Over2=. Over3=178 Over4=425.8&lt;BR /&gt;Over5=294.35 Over6=-8.21 _I_=. _temporary_=200 i=2 Total_Over=. _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;1 at 80:13&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 1 observations read from the data set BST5030.ORDERS_MIDYEAR.&lt;BR /&gt;WARNING: The data set WORK.PREFERRED_CUST may be incomplete. When this step was stopped there were 0 observations and 8 variables.&lt;BR /&gt;WARNING: Data set WORK.PREFERRED_CUST was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.02 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;95 proc print data=preferred_cust noobs;&lt;BR /&gt;96 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: No observations in data set WORK.PREFERRED_CUST.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;97&lt;BR /&gt;98 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;110&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Apr 2021 04:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734645#M228834</guid>
      <dc:creator>FrustratedBio</dc:creator>
      <dc:date>2021-04-16T04:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734647#M228836</link>
      <description>&lt;P&gt;This line is probably not doing what you thought:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array Target _temporary_ (200, 400, 300, 100, 100, 200);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Try it by itself.&lt;/P&gt;
&lt;PRE&gt;3094  data test;
3095  array Target _temporary_ (200, 400, 300, 100, 100, 200);
WARNING: Too many values for initialization of the array Target. Excess values are ignored.
3096  run;

NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.09 seconds
      cpu time            0.03 seconds
&lt;/PRE&gt;
&lt;P&gt;If you want to define a _temporary_ array you MUST tell it how many elements there are in the array.&amp;nbsp; Since you did not SAS thought you wanted to make an array with only one variable named _TEMPORARY_.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array Target [6] _temporary_ (200, 400, 300, 100, 100, 200);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 04:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734647#M228836</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-16T04:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Could somebody translate the meaning of the array subscript range?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734649#M228838</link>
      <description>Such an easy fix. Good thing I ain't majoring in this. Thanks!</description>
      <pubDate>Fri, 16 Apr 2021 04:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Could-somebody-translate-the-meaning-of-the-array-subscript/m-p/734649#M228838</guid>
      <dc:creator>FrustratedBio</dc:creator>
      <dc:date>2021-04-16T04:31:27Z</dc:date>
    </item>
  </channel>
</rss>

