<?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: Please Help with the error on Array &amp;quot;ERROR: Array subscript out of range at line ~ column ~ . &amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132012#M26920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;9 is bigger than the size of your array!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; text-decoration: underline; color: #0000ff;"&gt;array coding4 {*} salary1-salary6 salary7;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; text-decoration: underline; color: #0000ff;"&gt;array coding4 {10} salary1-salary6 salary7;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2012 15:55:21 GMT</pubDate>
    <dc:creator>TimArm</dc:creator>
    <dc:date>2012-11-21T15:55:21Z</dc:date>
    <item>
      <title>Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132000#M26908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for kind help in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got this error message which stops the SAS calculation.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ERROR: Array subscript out of range at line ~ column ~.&amp;nbsp;&amp;nbsp; (~'s replace actual numbers) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;set stdff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; array coding2 {*} agroup_1-agroup_6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; do i=1 to 6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding2(i)=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; array coding3 {*} boys girls notdisclose nodata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; do j=1 to 4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding3(j)=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; array coding4 {*} salary1-salary6 salary7;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; do k=1 to 7;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; coding4(k)=0;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; end;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; coding4(income_dx)=1;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #ff0000; text-decoration: underline;"&gt;&amp;lt;-------------------------------Error Happens Here!! Need help!!&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding3(gndr_dx)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding2(ETHG_dx)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;drop i j k;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, a little more information, I had a draft code I wrote myself which has no problem running.&amp;nbsp; In the draft code, the salary elements were labeled salary1-salary10.&lt;/P&gt;&lt;P&gt;later on we decided to combined some of the salary levels so it became 6 levels plus one missing value label (which is the salary7).&lt;/P&gt;&lt;P&gt;So, old codes are no problem.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing, if you just remove the most inner loop, the rest runs fine as well.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what happens in the most inner part.&amp;nbsp; Is that some kind of do-loop iteration problems?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done&lt;/P&gt;&lt;P&gt;1. change coding4 labels to (salary1 salary2 salary3 salary4.....&amp;nbsp; one by one listing), even name elements after 7 dwarfs so make sure no numbers in there.&lt;/P&gt;&lt;P&gt;2. add {7} in the { }&lt;/P&gt;&lt;P&gt;3. gave length to 3&lt;/P&gt;&lt;P&gt;4. do k =1 to 6, do k=1 to 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;none of them work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!!&amp;nbsp; Greatly Thanks!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 14:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132000#M26908</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T14:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132001#M26909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's the value of &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; text-decoration: underline; color: #0000ff;"&gt;income_dx&lt;/EM&gt; (or &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;gndr_dx&lt;/SPAN&gt; or &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ETHG_dx for that matter).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;At the point of the error you are outside of the do loop, so the value of k is irrelevant.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132001#M26909</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132002#M26910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The income_dx, gndr_dx and ethg_dx are all categorical variables indexing income levels (1,2,3,4,5,6 and 7 for missing), sex (boys, girls....) and sports group (1 2 3 4.....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the income_dx variables.&amp;nbsp; 1 means you make less than 30,000 a year and so on.......... 6 probably means 400K+ or something (I have to refer a doc. which says that all).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also checked in the frequcy tables, each variable values contains more than 1000 observations.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132002#M26910</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132003#M26911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why you said that the k is irrelevant at this point?&amp;nbsp; Why did you mean by "outside of the do loop? "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132003#M26911</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T15:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132004#M26912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Post the log that shows the error.&lt;/P&gt;&lt;P&gt;2. Post the results from the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=stdff;&lt;/P&gt;&lt;P&gt;table income_dx/missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Do you really need 3 nested loops? For example in the j=1 to 4 loop you don't end up using anywhere except the first line...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132004#M26912</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-11-21T15:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132005#M26913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lulus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS has already given you the detailed information you need.&amp;nbsp; Following the error message, SAS spits out the value of all your variables for that observation, including INCOME_DX.&amp;nbsp; We don't need a list of all the theoretically possible values for INCOME_DX, we need to know the value that INCOME_DX took for that particular observation where the ERROR occurred.&amp;nbsp; That information is already in your log.&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>Wed, 21 Nov 2012 15:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132005#M26913</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-11-21T15:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132006#M26914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for help.&amp;nbsp; In the very beginning, the read bold lines are from log file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I've done the proc freq as mentioned.&amp;nbsp; There are values in every category of the income level.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what means the j=1 to 4.&amp;nbsp; Actually I am very new to Array, could you explain more or you know any thing like step-debug I can do with SAS so I can better understand how the iteration goes.&amp;nbsp; Just wanted to do something to give dummy variables for &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all of the variables.&amp;nbsp; (income, sex, sportsgroup....)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132006#M26914</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T15:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132007#M26915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I meant was (although I failed to make it clear) was that you needed to know what the value of income_dx was at the point of the error. So, as Astounding says, the log may tell you.&lt;/P&gt;&lt;P&gt;If you do not have the log, then follow Reeza's advice and do a proc freq.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132007#M26915</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132008#M26916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you need to check is: are any of the values of income_dx outside the size of the array i.e. &amp;lt;1 or &amp;gt;7 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132008#M26916</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132009#M26917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my income_dx, the values are 1,2,3,4,5,6, and 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132009#M26917</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T15:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132010#M26918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; But the error message is complaining about an array subscript. And another clue is the warning that character variables are being converted to numeric. So, I would recommend that you look at all your index variables, in particular, INCOME_DX -- is it character or numeric? While you're at it, I'd also check GNDR_DX and ETHG_DX. Is it possible that INCOME_DX (or any of the other DX vars) is getting converted to missing or to a number greater than 7 (or greater than the limit of the array)???? I'd recommend running a PROC CONTENTS on your input SET to see whether INCOME_DX is character or numeric. If it is CHARACTER, then make sure that it will ALWAYS convert to a number and not missing. If it is NUMERIC, then make sure that the values are ONLY between 1 and 7 (you can check this with PROC FREQ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Also, just as a housekeeping note, ARRAY statements are compile time statements. That means they are only "touched" one time -- at compile time. You have them placed inside each DO loop -- that doesn't need to be the way you code ARRAY statements. You could have them all in one place under the SET statement. It would make your DO loops easier to read.&amp;nbsp; I wonder about the structure of your input data, that you have so many variable values being assigned inside nested DO loops, but you know your data and know whether you need to nest the loops like this.&amp;nbsp; For example, &lt;STRONG&gt;coding2(ETHG_dx)=1;&lt;/STRONG&gt; is OUTSIDE of any DO loop, so it will happen 1 time. On the other hand, &lt;STRONG&gt;coding3(gndr_dx)=1;&lt;/STRONG&gt; is INSIDE the DO loop for I, so it will get executed 6 times. If you only have 1 value for GNDR_DX, then you are executing this statement 5 extra times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Another thing I can think of is that your INCOME_DX variable is a character string that is either a salary variable with puntuation ($35,000) or a description of the salary (Over $30K) and neither of those values can be used as array subscripts. When SAS would try to convert these values from character to numeric, you would get a missing value, which would be an invalid array subscript.&amp;nbsp; INCOME_DX has to be a number between 1 and 7; GNDR_DX has to be a number between 1 and 4; and ETHG_DX has to be a number between 1 and 6.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;An alternative program with some comments to show the nesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data XXX;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;set stdff;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; array coding2 {*} agroup_1-agroup_6;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; array coding3 {*} boys girls notdisclose nodata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; array coding4 {*} salary1-salary6 salary7;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** initialize arrays to 0 and set values;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; do i=1 to 6;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding2(i)=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=1 to 4;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding3(j)=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do k=1 to 7;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding4(k)=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&amp;nbsp; /* end for do k */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding4(income_dx)=1;&amp;nbsp; /* income_dx cannot exceed 7 */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&amp;nbsp; /* end for do j */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding3(gndr_dx)=1;&amp;nbsp; /* gndr_dx cannot exceed 4 */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; end;&amp;nbsp;&amp;nbsp; /* end for do i */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; coding2(ETHG_dx)=1;&amp;nbsp; /* ETHG_dx cannot exceed 2 */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;drop i j k;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132010#M26918</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-11-21T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132011#M26919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is Char, I used proc contents to check about it.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132011#M26919</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T15:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132012#M26920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;9 is bigger than the size of your array!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; text-decoration: underline; color: #0000ff;"&gt;array coding4 {*} salary1-salary6 salary7;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; text-decoration: underline; color: #0000ff;"&gt;array coding4 {10} salary1-salary6 salary7;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132012#M26920</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132013#M26921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; A simple number without punctuation should convert correctly. The problem that I see, is when you say that INCOME_DX can possibly have a value of &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/SPAN&gt;, but you have defined your CODING4 array to only have &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt; elements, so a value for 9 will be considered "out of range".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132013#M26921</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-11-21T15:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132014#M26922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you also need do k=1 to 10; as well!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132014#M26922</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132015#M26923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;super wired, I actually then converted the income_dx to an income_dx2 and assign the 2nd one numeric type, the re-ran the loop, and the probem&lt;/P&gt;&lt;P&gt;moved down to line (plz see original) &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;coding2(ETHG_dx)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132015#M26923</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T16:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132016#M26924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a great update.&amp;nbsp; Even it's not perfect yet.&amp;nbsp; However, now I am able to have the nested loop completed &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXCEPT!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it wouldn't print out the missing element for me.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, ok the income_dx are all going to be my binary variables.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I have 6 columbs represent salary1 salary2 ....salary6 but just not the "missing", ok I changed the name to salary9, didn't work, and ok changed it again to salary7...................didn't work,either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the error for my log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; ERROR: Array subscript out of range at line ~ column ~.&lt;/STRONG&gt; and that's it.&amp;nbsp; None of my errors have rulers or something.&lt;/P&gt;&lt;P&gt;which is this line here, &lt;STRONG&gt;coding4(k)=0;&amp;nbsp; (???????)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Didn't I tell SAS PLEASE do 1 to 7? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happened makes it just give me 6 columns (binary dummies variables)? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132016#M26924</guid>
      <dc:creator>Lulus</dc:creator>
      <dc:date>2012-11-21T16:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132017#M26925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your earlier post said the income_dx values were &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1,2,3,4,5,6, and 9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do coding4(income_dx) = 1;, then that is going to put something in coding(9) at some point.&lt;/P&gt;&lt;P&gt;Have you got somewhere for sas to put it?&lt;/P&gt;&lt;P&gt;Go back to declaring your array as salary1-salary10 and there will be a variable to store for coding(9).&lt;/P&gt;&lt;P&gt;Then you also need to make sure that you are looking at all of the values when you are retrieving/initialising the values i.e. do k=1 to 10; NOT do k=1 to 7;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132017#M26925</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T16:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132018#M26926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;set stdff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; array coding2 {*} agroup_1-agroup_6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; do i=1 to 6;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding2(i)=0; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;/*i isn't used past this point but you're repeating the loop 6 times for what reason?????*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array coding3 {*} boys girls notdisclose nodata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=1 to 4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding3(j)=0;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;/*j isn't used past this point but you're repeating the loop 4 times for what reason?????*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; array coding4 {*} salary1-salary6 salary7;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; do k=1 to 7; &lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; coding4(k)=0; &lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;/*k isn't used past this point but you're repeating the loop 7 times for what reason?????*/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; end;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM style="color: #0000ff; text-decoration: underline;"&gt;&amp;nbsp; coding4(income_dx)=1;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #ff0000; text-decoration: underline;"&gt;&amp;lt;-------------------------------Error Happens Here!! Need help!!&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding3(gndr_dx)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; coding2(ETHG_dx)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;drop i j k;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Your loops and code make no sense to me at all. And if you've define an array of 7 elements but call it with 9 then it's clearly out of range. Re-think whatever you're trying to do and give it another go...&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132018#M26926</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-11-21T16:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help with the error on Array "ERROR: Array subscript out of range at line ~ column ~ . "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132019#M26927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like you're looking for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;coding4(min(7, income_dx))=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way, when income_dx is 9, the MIN function returns 7 and the statement changes the 7th element of the array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sensible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:56:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-Help-with-the-error-on-Array-quot-ERROR-Array-subscript/m-p/132019#M26927</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-11-21T16:56:10Z</dc:date>
    </item>
  </channel>
</rss>

