<?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: How to read data from the matrix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352595#M82212</link>
    <description>&lt;P&gt;I don't think there is one "proper" way. Here is one way that would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data  want (drop=_:);
  infile 'c:\art\ds.txt' firstobs=6;
  informat name $40.;
  input @;
  call scan(_infile_,-1,_position,_length);
  month=substr(_infile_,_position);
  _infile_=substr(_infile_,1,_position-1);
  input sales orderno name &amp;amp;;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Apr 2017 14:01:32 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-04-23T14:01:32Z</dc:date>
    <item>
      <title>How to read data from the matrix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352593#M82210</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how to read the attached data in the proper way.&lt;/P&gt;&lt;P&gt;please give the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 13:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352593#M82210</guid>
      <dc:creator>bogapraveen</dc:creator>
      <dc:date>2017-04-23T13:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from the matrix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352595#M82212</link>
      <description>&lt;P&gt;I don't think there is one "proper" way. Here is one way that would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data  want (drop=_:);
  infile 'c:\art\ds.txt' firstobs=6;
  informat name $40.;
  input @;
  call scan(_infile_,-1,_position,_length);
  month=substr(_infile_,_position);
  _infile_=substr(_infile_,1,_position-1);
  input sales orderno name &amp;amp;;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 14:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352595#M82212</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-23T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from the matrix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352596#M82213</link>
      <description>&lt;P&gt;Depends on what you want. If you want to read them all into a single row then just read them all as names and move the last one into the month field.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile datalines truncover  ;
  length sales orderno 8 month $3 num 8;
  array name (10) $28 ;
  input sales orderno name1-name10 ;
  num =  dim(name) - cmiss(of name(*));
  month = name(num);
  name(num)=' ';
  num=num-1;
  format sales dollar9.;
datalines;
25000 2 raheem pasha shaik jan
30000 3 shaik shabeer pasha aug
45000 6 rama krishna oct
98000 5 gopal feb
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Apr 2017 14:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352596#M82213</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-23T14:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from the matrix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352758#M82263</link>
      <description>&lt;P&gt;Thank you for your reply, I am&amp;nbsp;getting output what I expected.&lt;/P&gt;&lt;P&gt;Is there any shortcut code apart from this line,&amp;nbsp;using &amp;nbsp;:&amp;nbsp;@ type of input statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry, I could understand the following line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;input @;
  call scan(_infile_,-1,_position,_length);
  month=substr(_infile_,_position);
  _infile_=substr(_infile_,1,_position-1);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 08:59:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-data-from-the-matrix/m-p/352758#M82263</guid>
      <dc:creator>bogapraveen</dc:creator>
      <dc:date>2017-04-24T08:59:52Z</dc:date>
    </item>
  </channel>
</rss>

