<?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: Do loop and Array in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234231#M42818</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst﻿&lt;/a&gt;, no worries ! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will move this post to the programming community forum -- I follow this forum very closely but I'm not a SAS expert &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take care,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lainie&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 16:35:17 GMT</pubDate>
    <dc:creator>LainieH</dc:creator>
    <dc:date>2015-11-11T16:35:17Z</dc:date>
    <item>
      <title>Re: Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234229#M42817</link>
      <description>Hi LainieH,&lt;BR /&gt;Very Sorry , i think this is the 2nd time i did this .I dont know how i forgot ? . I will remember . Thank you . Kanchan&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234229#M42817</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-11T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234227#M42833</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need some help on the below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to Split the the account numbers , But as the i coun not make the array dynamic&amp;nbsp;and it is creating additional columns.I wanted&amp;nbsp;&lt;SPAN&gt;name1-Name12 should stop when finda gets &amp;nbsp;the maximum value.Can i create array as per the number which produce by&amp;nbsp;finda . finda is a user variable. could be anything.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data newdata;&lt;BR /&gt;input Line$ 30.;&lt;BR /&gt;finda = anydigit(Line);&lt;BR /&gt;if finda &amp;gt; 0 then &lt;BR /&gt;accno = substr(Line,finda,10 ) ;&lt;BR /&gt;Array namea (12)$ name1-Name12;&lt;BR /&gt;do i = 1 to 12;&lt;BR /&gt;namea (i)= Substr(accno ,i,1);&lt;BR /&gt;end;&lt;BR /&gt;datalines;&lt;BR /&gt;Citi 2323232&lt;BR /&gt;State Bank of india 232323&lt;BR /&gt;;&lt;BR /&gt;proc print data = newdata;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234227#M42833</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-11T16:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234228#M42834</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst﻿&lt;/a&gt;, you have posted your question in the discussion forum that is not about SAS products (this is the discussion board to discuss the new community platform).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to move your post to another community.. If you could please click the orange Find a&amp;nbsp;Community box in the right nav and advise which community you think this belongs and I'm happy to move it for you...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise I can move it to Base SAS Programming (&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/bd-p/programming)" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/bd-p/programming)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!! &amp;nbsp;I say this because you will find people will respond more quickly to the topical discussion forums as they are probably not following this forum as closely..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234228#M42834</guid>
      <dc:creator>LainieH</dc:creator>
      <dc:date>2015-11-11T16:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234231#M42818</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst﻿&lt;/a&gt;, no worries ! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will move this post to the programming community forum -- I follow this forum very closely but I'm not a SAS expert &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take care,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lainie&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234231#M42818</guid>
      <dc:creator>LainieH</dc:creator>
      <dc:date>2015-11-11T16:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234241#M42832</link>
      <description>&lt;P&gt;The number of elements in the array cannot change from one observation to the next.&amp;nbsp; If the length of an account number can vary from one observation to the next, you need to define an array with enough elements to hold the longest account number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a small change that can end your DO loop once all the characters are read from ACCNO:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if finda &amp;gt; 0 then do i=1 to (length(line) - finda + 1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note, your array statement is defining name1-name12 as being 8 characters long.&amp;nbsp; A simple change can fix that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array namea (12) $ 1 name1-name12;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 17:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234241#M42832</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-11T17:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Do loop and Array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234300#M42837</link>
      <description>&lt;P&gt;Why do you want to split up the account numbers into single digits? If you let us know then may be there&amp;nbsp;are other ways to achieve your desired end result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 21:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Do-loop-and-Array/m-p/234300#M42837</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-11-11T21:59:31Z</dc:date>
    </item>
  </channel>
</rss>

