<?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: Reading data from text-file into array in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55420#M11794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your put statement is after your two loops, thus i=21 and j=21.&amp;nbsp; Therefore, when the system confronts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;put a(i,j);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;It is being asked for an array value that is outside of the parameters you declared.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Oct 2012 22:51:02 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-10-13T22:51:02Z</dc:date>
    <item>
      <title>Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55411#M11785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H&lt;SPAN style="color: #000000;"&gt;i,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have a text file containing 20 x 20 numbers, which are all of two digits. I am trying to read these numbers into a 20 x 20 array (which I call "a"). When I put the array a in my code below, I don't get a 20 x 20 array, but something enormous, which looks more like each entry a[i,j] of the array contains 20 entries by itself. Can anyone see where I went wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hedegaard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;proc import datafile = "C:\Documents and Settings\Desktop\grid.txt" out=work.griddata replace;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delimiter = " ";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getnames = no;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; guessingrows = 20;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;data grid;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set griddata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;array var{1:20} VAR1-VAR20;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;array a{20,20};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;do i = 1 to 20;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a[i,_N_] = var&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;put a&lt;LI&gt;;&lt;/LI&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &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;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 11:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55411#M11785</guid>
      <dc:creator>Hedegaard</dc:creator>
      <dc:date>2012-04-04T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55412#M11786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can please send the dummy text file which you are trying to read?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 11:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55412#M11786</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-04-04T11:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55413#M11787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 11:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55413#M11787</guid>
      <dc:creator>Hedegaard</dc:creator>
      <dc:date>2012-04-04T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55414#M11788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;two-dimention arrays is denoted as array(row, column). So for your purpose, it will be easier to read if you define your array:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a[_n_,i] = var&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of a[i,_N_] = var&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other than that, I don't see any problems, it works the way it should. Both will give you 400 new variables, so I don't understand your question. You probably was looking for something proc iml does, but not arrays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55414#M11788</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-04T12:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55415#M11789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, I think I understand now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What bothered me was that there seemed to be a 20 rows of each entry of the array a, so that when I asked SAS to "put a[i,j];" for some specific choice of i and j, then I'd see a 20 entry long list in the log, where all but one entry was missing. This might be because it creates the array for each of the twenty rows in the input file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am interested in working with the final and filled up array, so I suppose I could encapsule whatever I want to do with the array in an "if _N_=20" condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: And it would appear I also need to add a "retain" statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55415#M11789</guid>
      <dc:creator>Hedegaard</dc:creator>
      <dc:date>2012-04-04T12:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55416#M11790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, in that case, you could try the following, it may meet your need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data grid;&lt;/P&gt;&lt;P&gt;infile "C:\Documents and Settings\Desktop\grid.txt";&lt;/P&gt;&lt;P&gt;array a{20,20};&lt;/P&gt;&lt;P&gt;do i = 1 to 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do j=1 to 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input a[i,j] @@;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;put a&lt;LI&gt;;&lt;/LI&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55416#M11790</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-04T12:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55417#M11791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hai.kuo, that works perfectly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure why though? What does the input command do exactly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 13:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55417#M11791</guid>
      <dc:creator>Hedegaard</dc:creator>
      <dc:date>2012-04-04T13:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55418#M11792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cause you need 400 variables in ONE line populated with values. If you already have them in a dataset of 20 lines (rows, obs), it will be a lot harder to achieve your goal. 'input @@' will let you keep reading until the end of the file, which can be considered as just one line if numer of your variables are equal or more than the number of the data elements in your raw flat file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 13:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55418#M11792</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-04T13:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55419#M11793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey Haikuo,&lt;/P&gt;&lt;P&gt;related to this problem...&lt;/P&gt;&lt;P&gt;when i use the code below everything is fine except that in the log i get 400 observations,one for each element of the array&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;infile ' file';&lt;/P&gt;&lt;P&gt;input a1-a400;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; array a(20,20) a1-a400;&lt;/P&gt;&lt;P&gt; do i=1 to 20;&lt;/P&gt;&lt;P&gt; do j=1 to 20;&lt;/P&gt;&lt;P&gt;put a(i,j);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i j;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then when i try this code below i get &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: Array subscript out of range at line 871 column 5.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;do you know why? :smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;infile ' file';&lt;/P&gt;&lt;P&gt;input a1-a400;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; array a(20,20) a1-a400;&lt;/P&gt;&lt;P&gt; do i=1 to 20;&lt;/P&gt;&lt;P&gt; do j=1 to 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;end;&lt;/P&gt;&lt;P&gt;put a(i,j);&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i j;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 22:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55419#M11793</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2012-10-13T22:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55420#M11794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your put statement is after your two loops, thus i=21 and j=21.&amp;nbsp; Therefore, when the system confronts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;put a(i,j);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;It is being asked for an array value that is outside of the parameters you declared.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 22:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55420#M11794</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-13T22:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55421#M11795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Arthur.&lt;/P&gt;&lt;P&gt;After changing the 20 to 19 SAS did not give me any errors but when i have &lt;STRONG&gt;put&lt;/STRONG&gt; out of the loop SAS does not write the observations onto the log window.Why?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 23:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55421#M11795</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2012-10-13T23:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55422#M11796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you did or why.&amp;nbsp; With a 20 by 20 matrix you have 400 values.&amp;nbsp; By having a put statement within the loop it is being addressed 400 times thus outputting 400 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you move it outside of the loop it is only outputting 1 value.&amp;nbsp; Why did you move it outside of the loop in the first place?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 14:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55422#M11796</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-14T14:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55423#M11797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Arthur.&lt;/P&gt;&lt;P&gt;With PUT inside the loop,SAS is writing 400x1 observations in the log and i kinda wanted to see something like a matrix form of results so i thought if i play with PUT would eventually get that result lol but i guess when it is out SAS only writes the last element of the array.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 02:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55423#M11797</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2012-10-15T02:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55424#M11798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data grid;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; infile "C:\Documents and Settings\Desktop\grid.txt";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array a{20,20};&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=1 to 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input a[i,j] @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if j lt 20 then put @(j*4) a[i,j] @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else put a[i,j];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 13:52:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55424#M11798</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-15T13:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55425#M11799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the array you mentioned is temporary array not normal variable array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data _null_;
infile 'c:\grid.txt' end=last;
array a{20,20} _temporary_;
array x{20} x1-x20;
input x1-x20;
do k=1 to 20;
a{_n_,k}=x{k};
end;




if last then do;
do i=1 to 20;
 do j=1 to 20;
&amp;nbsp; put a{i,j} @ ;
 end;
 put / ;
end;
end;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 04:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55425#M11799</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-10-16T04:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55426#M11800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks both&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 21:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55426#M11800</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2012-10-21T21:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from text-file into array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55427#M11801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 21:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-from-text-file-into-array/m-p/55427#M11801</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2012-10-21T21:24:56Z</dc:date>
    </item>
  </channel>
</rss>

