<?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 raw file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-file/m-p/444258#M111187</link>
    <description>&lt;P&gt;It appears that your data is TAB delimited.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;data tempy;
   infile "C:\Users\FATEMEH\Desktop\summer2017work\temp.txt" dlm='09'x;
   informat  dept $5.  wagecat $1.   wagerate 7.2   manager $7.     jobtype 3.;
   input  dept    wagecat wagerate  manager  jobtype  ;
run;&lt;/PRE&gt;
&lt;P&gt;I moved the informats to a separate line as they can cause issues when reading delimited text by forcing a read longer than the values that appear when the values have varying lengths such as your wagerate (5 to 7 ) and manager (4 to 7 characters).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 20:34:57 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-09T20:34:57Z</dc:date>
    <item>
      <title>Reading raw file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-file/m-p/444253#M111185</link>
      <description>&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;I want to read this raw data ,that i attached here, in sas.But there is a problem in my coding i can not find the right start point for each variable when using @ in the input statement, also the length of each variable is not clear for me.Bellow is my code. Any help is appreciated !&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data tempy;&lt;BR /&gt;infile "C:\Users\FATEMEH\Desktop\summer2017work\temp.txt";&lt;BR /&gt;input @1 dept$5.&amp;nbsp;&amp;nbsp; &amp;nbsp;@7 wagecat$1.&amp;nbsp;&amp;nbsp; &amp;nbsp;@8 wagerate 7.2&amp;nbsp;&amp;nbsp; &amp;nbsp; @16manager$7.&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/105043"&gt;@23&lt;/a&gt; jobtype 3.;&lt;BR /&gt;proc print data=tempy;run;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 20:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-raw-file/m-p/444253#M111185</guid>
      <dc:creator>fatemeh</dc:creator>
      <dc:date>2018-03-09T20:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-file/m-p/444258#M111187</link>
      <description>&lt;P&gt;It appears that your data is TAB delimited.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;data tempy;
   infile "C:\Users\FATEMEH\Desktop\summer2017work\temp.txt" dlm='09'x;
   informat  dept $5.  wagecat $1.   wagerate 7.2   manager $7.     jobtype 3.;
   input  dept    wagecat wagerate  manager  jobtype  ;
run;&lt;/PRE&gt;
&lt;P&gt;I moved the informats to a separate line as they can cause issues when reading delimited text by forcing a read longer than the values that appear when the values have varying lengths such as your wagerate (5 to 7 ) and manager (4 to 7 characters).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 20:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-raw-file/m-p/444258#M111187</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-09T20:34:57Z</dc:date>
    </item>
  </channel>
</rss>

