<?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: Array subscript out of range in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80962#M17431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Untested but should work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data new;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; old;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; tot ge &lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; rep = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;'N'&amp;nbsp; then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; call missing(of var:);&amp;nbsp; /* or call missing(of var1-var7);&amp;nbsp; read the doc on "of" keyword and variable lists */&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 07:53:42 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2013-05-21T07:53:42Z</dc:date>
    <item>
      <title>Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80960#M17429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to fill fields per row as missing (currently some fields have zeros) for certain rows, where rep='N'.&lt;/P&gt;&lt;P&gt;All variables I'm replacing as missing either have a numerical value of zero or are missing.&lt;/P&gt;&lt;P&gt;But I'm getting an error:&amp;nbsp; Array subscript out of range at line 409 column 28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data new;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; old;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; tot ge &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; vars var1 var2 var3 var4 var5 var6 var7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; rep = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'N'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; vars=.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 22:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80960#M17429</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2013-05-20T22:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80961#M17430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming that you want to assign missing to each of the variables when REP='N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if rep='N' then do over vars; vars=.; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you do not like the old style DO OVER then use an explicit index variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if rep='N' then do _n_=1 to dim(vars); vars(_n_)=. ; end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 23:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80961#M17430</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-05-20T23:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80962#M17431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Untested but should work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data new;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp; set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; old;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; tot ge &lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; rep = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;'N'&amp;nbsp; then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; call missing(of var:);&amp;nbsp; /* or call missing(of var1-var7);&amp;nbsp; read the doc on "of" keyword and variable lists */&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 07:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80962#M17431</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-05-21T07:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Array subscript out of range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80963#M17432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if rep = 'N' then call missing(of var1-var7);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 08:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-subscript-out-of-range/m-p/80963#M17432</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2013-05-21T08:10:03Z</dc:date>
    </item>
  </channel>
</rss>

