<?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 data files when data is not in fixed columns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54851#M15225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your input fields are all numbers then you can use data step logic to do it without macro code.&lt;/P&gt;&lt;P&gt;Create an array of the target variables and another with the expected length of each variable.&lt;/P&gt;&lt;P&gt;Then loop over the arrays keeping your own pointer into the input buffer.&amp;nbsp; You can adjust the length depending on whether the value starts with a minus sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data out;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array var f1-f6 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array len (6) _temporary_ (6*4) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; col=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; do _n_ = 1 to dim(var);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; neg=substr(_infile_,col,1)='-';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var(_n_)=input(substr(_infile_,col,len(_n_)+neg),best.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; col+len(_n_)+neg;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; drop col neg ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put (var(*)) (best6.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.1 0.2 0.3 0.4 0.5 0.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.110.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 shifts by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.220.33-0.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f4 each adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f3, f4, f5, f6 all adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; everything is wider by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-0.11-0.220.33-0.440.55-0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&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;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; 0.1&amp;nbsp;&amp;nbsp; 0.2&amp;nbsp;&amp;nbsp; 0.3&amp;nbsp;&amp;nbsp; 0.4&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp; 0.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11&amp;nbsp; 0.22&amp;nbsp; 0.33&amp;nbsp; 0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22&amp;nbsp; 0.33&amp;nbsp; 0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22&amp;nbsp; 0.33 -0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22 -0.33 -0.44 -0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; -0.11 -0.22 -0.33 -0.44 -0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; -0.11 -0.22&amp;nbsp; 0.33 -0.44&amp;nbsp; 0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 18:12:01 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-08-30T18:12:01Z</dc:date>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54837#M15211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just recently found an error in the following attached code reading in a raw data file.&amp;nbsp; We originally though the raw data file was in fixed columns, but just found out the data for afrpf and lbpf can sometime have a negative in front of the number and does not have a placeholder for the negative.&amp;nbsp; In other words if afrpf contains a negative it then moves all data after it one space to the right which causes the code to pick up the wrong information.&amp;nbsp; If both afrpf and lbpf contain negative all other information after is moved two spaces to the right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only aware how to read in data that is in fixed columns so any help with this would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lori&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;﻿&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 14:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54837#M15211</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-25T14:02:49Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54838#M15212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will likely get a best answer if you also provide a small sample dataset that shows how the data actually appear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 14:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54838#M15212</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-25T14:10:30Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54839#M15213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I have attached the data also. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 14:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54839#M15213</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-25T14:14:57Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54840#M15214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can definitely input virtually any kind of data with SAS, but your file looks like it is quite formatted.&amp;nbsp; Can you provide one more sample, namely for the second record in your attached file, what you are expecting the resulting file to look like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 14:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54840#M15214</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-25T14:35:50Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54841#M15215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The file 616344 includes a negative for the afrpf value and the file 547299 is what we expected the data files to look like (no negatives).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 14:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54841#M15215</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-25T14:40:50Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54842#M15216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't understand.&amp;nbsp; The 3rd line of file 616344 appears as follows:&lt;/P&gt;&lt;P&gt;Wed 08-24-2011 14:34:40101001-50 -20 0 0 4 0 -90 -60 240 24301830302 300 3084 2996 -108 3217 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 3217 6 6 0 0 66&amp;nbsp; 66&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0 0 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 41.916.00.00 50&amp;nbsp;&amp;nbsp; -50&amp;nbsp; -0.00.042&amp;nbsp; 0.010.02491011000.00 0.0&amp;nbsp; 0.0100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which field(s) in the above record is not being read correctly, what SAS file variable(s) should the value be assigned to, and what value(s) should it have?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 15:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54842#M15216</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-25T15:00:33Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54843#M15217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; For the 616344 record this is what is happening when the code is ran:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;day= Wed&lt;/P&gt;&lt;P&gt;sdate= 08-24-2011&lt;/P&gt;&lt;P&gt;stime= 14:34:40&lt;/P&gt;&lt;P&gt;pwnd1= 1&lt;/P&gt;&lt;P&gt;pwnd2= 0&lt;/P&gt;&lt;P&gt;punwnd1= 1&lt;/P&gt;&lt;P&gt;punwnd2= 0&lt;/P&gt;&lt;P&gt;unchp200= 0&lt;/P&gt;&lt;P&gt;rechp500= 1&lt;/P&gt;&lt;P&gt;w1zpf1= -5&lt;/P&gt;&lt;P&gt;w1zps1= 0&lt;/P&gt;&lt;P&gt;w1zpf2= -2&lt;/P&gt;&lt;P&gt;w1zps2= 0&lt;/P&gt;&lt;P&gt;w1zpf3= 0&lt;/P&gt;&lt;P&gt;w1zps3= 0&lt;/P&gt;&lt;P&gt;w1zpf4= 4&lt;/P&gt;&lt;P&gt;w1zps4= 0&lt;/P&gt;&lt;P&gt;w1zpf5= -9&lt;/P&gt;&lt;P&gt;w1zps5= 0&lt;/P&gt;&lt;P&gt;w1zpf6= -6&lt;/P&gt;&lt;P&gt;w1zps6= 0&lt;/P&gt;&lt;P&gt;w1zpf7= 24&lt;/P&gt;&lt;P&gt;w1zps7= 0&lt;/P&gt;&lt;P&gt;w2pf= 24&lt;/P&gt;&lt;P&gt;w2ps= 30&lt;/P&gt;&lt;P&gt;w3pf= 18&lt;/P&gt;&lt;P&gt;w3ps= 30&lt;/P&gt;&lt;P&gt;unctft1= 302&lt;/P&gt;&lt;P&gt;unctst1= 300&lt;/P&gt;&lt;P&gt;metft2= 3084&lt;/P&gt;&lt;P&gt;metst2= 2996&lt;/P&gt;&lt;P&gt;metft3= -108&lt;/P&gt;&lt;P&gt;metst3= 3217&lt;/P&gt;&lt;P&gt;rectft4= 0&lt;/P&gt;&lt;P&gt;rectst4= 3217&lt;/P&gt;&lt;P&gt;pwndf= 6&lt;/P&gt;&lt;P&gt;pwnds= 6&lt;/P&gt;&lt;P&gt;punwndf= 0&lt;/P&gt;&lt;P&gt;punwnds= 0&lt;/P&gt;&lt;P&gt;mlspdf= 66&lt;/P&gt;&lt;P&gt;mlspds= 66&lt;/P&gt;&lt;P&gt;entspf= 0&lt;/P&gt;&lt;P&gt;extspf= 0&lt;/P&gt;&lt;P&gt;entqf= 0&lt;/P&gt;&lt;P&gt;extqf= 0&lt;/P&gt;&lt;P&gt;footcntf= 0&lt;/P&gt;&lt;P&gt;unodf= 41.9&lt;/P&gt;&lt;P&gt;reodf= 16.0&lt;/P&gt;&lt;P&gt;sefv= 0.00&lt;/P&gt;&lt;P&gt;tmspdf= 50&lt;/P&gt;&lt;P&gt;bmspdf= -50&lt;/P&gt;&lt;P&gt;afrpf= -0. (should be 0.0) Root of the problem starts here, should not have a negative.&lt;/P&gt;&lt;P&gt;lbpf= 00. (should be 0.0)&lt;/P&gt;&lt;P&gt;trffv= 042 (should be 42)&lt;/P&gt;&lt;P&gt;scpfd= 0.0 (should be 0.01)&lt;/P&gt;&lt;P&gt;scpfo= 10.0 (should be 0.02)&lt;/P&gt;&lt;P&gt;srpv= 24 (should be 49)&lt;/P&gt;&lt;P&gt;entbridl= 9 (should be 1)&lt;/P&gt;&lt;P&gt;pass= 1 (should be 0)&lt;/P&gt;&lt;P&gt;extbridl=0 (should be 1)&lt;/P&gt;&lt;P&gt;reelor= 1 (should be 1, ends up being correct)&lt;/P&gt;&lt;P&gt;drywettm= 1 (should be 0)&lt;/P&gt;&lt;P&gt;stripoil= 0 (should be 0, ends up being correct)&lt;/P&gt;&lt;P&gt;elongset= 00.00 (should be 0.00)&lt;/P&gt;&lt;P&gt;oilrate= 0.0 (should be 0.0, ends up being correct)&lt;/P&gt;&lt;P&gt;thicknes= 0.010 (should be 0.0100)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 15:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54843#M15217</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-25T15:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54844#M15218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;With both data files, data look consistent up to column 159, with difference occuring at column 160.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;If column 160 contains a '-' then that field is 1 char wider, and everything gets pushed right.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;SAS is extremely flexible in handling inputs, so if I understand your problem and data correctly, then something like this should work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;input .... &amp;lt;up to column 159&amp;gt;&amp;nbsp; @160 byte $char1.&amp;nbsp; @;&amp;nbsp;&amp;nbsp; /*&amp;nbsp; read up to 159, read single character @ 160, @ holds the line&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if byte = '-' then input @160 (afrpf or lbpf) 4.&amp;nbsp; &amp;lt;followed by list of variables&amp;gt; ..... ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else input @160 (afrpf or lbpf) 3.&amp;nbsp; &amp;lt;followed by list of variables&amp;gt; ..... ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;(I'm not sure what field is at column 160, put the appropriate variable name there)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;This method can be repeated as often as necessary to keep on shifting right as necessary.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Hope this helps.&amp;nbsp; Good Luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;SAS can read, with probability 1, anything!&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://www2.sas.com/proceedings/sugi29/253-29.pdf"&gt;http://www2.sas.com/proceedings/sugi29/253-29.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 15:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54844#M15218</guid>
      <dc:creator>DLing</dc:creator>
      <dc:date>2011-08-25T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54845#M15219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="jive-rendered-content" style="font-size: 12px; margin-bottom: 20px; overflow-x: visible; overflow-y: visible; position: relative; width: 522px; padding: 2px;"&gt;I'm not at all sure that I understand what the problem is, but it appears that if col 160 has a minus sign in it, that you simply want to skip that column .. otherwise you don't want to skip it.&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;If that is the case, then one way of fixing the problem would simply be to break the input into 3 parts rather than one.&amp;nbsp; I modified your code as follows and obtained the data that you indicated was desired:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bmspdf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Bottom Mill Motor Speed Fdbk */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @160 testchar $char1. @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if testchar ne "-" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @159 testchar $char1. @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; afrpf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* AntiFlutter Roll Posn Fdbk&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/103669/edit" style="font-size: 10px; color: #777777; display: inline-block;"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 16:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54845#M15219</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-25T16:12:07Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54846#M15220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might approach this by inspecting the _INFILE_ buffer at each location which might hold a minus sign, then inserting a blank as a placeholder if there is no minus sign. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; want ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;input&lt;SPAN style="color: #000000;"&gt; @ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;do&lt;/SPAN&gt; minuscol = &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt; , &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr( _infile_ , minuscol , &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; ) NE &lt;SPAN style="color: #800080;"&gt;'-'&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;then&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;substr&lt;/SPAN&gt;( _infile_ , minuscol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) = &lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat( &lt;SPAN style="color: #800080;"&gt;' '&lt;/SPAN&gt; , substr( _infile_ , minuscol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) ) ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;end&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;&lt;SPAN style="color: #0000ff;"&gt;input&lt;/SPAN&gt; a &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&lt;/SPAN&gt; b &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt;&lt;/SPAN&gt; c &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&lt;/SPAN&gt; d &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New; color: #0000ff;"&gt;cards&lt;SPAN style="color: #000000;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;1.11.21.31.4&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;2.1-2.22.32.4&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;3.13.23.3-3.4&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;4.1-4.24.3-4.4&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier New;"&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Comments&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. This problem as originally posted put a lot of work on the reader: unzipping files, examining long records, and sifting through a lot of code which did not address the issue. A simple, compact example focusing on the problem at hand will get a lot more attention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If possible, educate the data provider. Files structured like this are substandard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 13:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54846#M15220</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2011-08-26T13:01:57Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54847#M15221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; DLing,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having issues repeating this method with another column.&amp;nbsp; I can do it correctly using it on the afrpf value @160.&amp;nbsp; I will attach the code and call it NEW.&amp;nbsp; However, the variable right after afrpf which is lbpf sometimes has a negative also and I need to shift values over again.&amp;nbsp; Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 20:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54847#M15221</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-29T20:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54848#M15222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the approach suggested by Howles?&amp;nbsp; It might be exactly what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 20:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54848#M15222</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-29T20:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54849#M15223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the other posters have noted, this is a really bad data structure to work with, and is causing anyone that needs to manipulate data enormous headache.&amp;nbsp; Fixing the issue properly at source is the ideal solution, otherwise it will continue to be a maintenance nightmare.&amp;nbsp; Whoever created the output should be made to read it back in in order to appreciate the consequences of poor design.&amp;nbsp; Even if the data file can be changed to pure fixed position file, or a separator delimited file, there is still all of the existing instrumentation logfiles to deal with, so the problem doesn't go away entirely until the old files can be done away with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The core issue, if I understand your situation correctly, is that when fields go negative, instead of prepending a minus sign and dropping the right most digit, thus keeping the same field width (probably didn't want to lose the field precision), the program writes a minus sign followed by the same number of columns, thus widening the field by 1.&amp;nbsp; And this has happened at a few places in the file so far.&amp;nbsp; This is really nasty since each time it happens, it will shove all the following field by 1, thus the minus sign won't necessarily all occur at the same position except the very first field.&amp;nbsp; Approaches that scan for minus at pre-determined positions won't work well without enumerating all possible combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS is extremely flexible in reading data files, so there's always a way &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;, though it becomes increasing complex and fragile, and require more skills to maintain and diagnose problems.&amp;nbsp; Here's a short program that illustrates an approach that should be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This first data step uses fixed column input.&amp;nbsp; The first 2 records conform to the structure, and is read in OK.&amp;nbsp; All following records cause problems.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; out;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f1 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f2 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f3 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f4 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f5 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f6 &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.1 0.2 0.3 0.4 0.5 0.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.110.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 shifts by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.220.33-0.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f4 each adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f3, f4, f5, f6 all adds 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;-0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; everything is wider by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;-0.11-0.220.33-0.440.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f4 in line 267 13-16.&lt;/P&gt;&lt;P&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/P&gt;&lt;P&gt;267 0.11-0.220.33-0.440.550.66 f2, f4 each adds 1&lt;/P&gt;&lt;P&gt;f1=0.11 f2=-0.2 f3=20.3 f4=. f5=440 f6=550 _ERROR_=1 _N_=4&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f3 in line 268 9-12.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f4 in line 268 13-16.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f5 in line 268 17-20.&lt;/P&gt;&lt;P&gt;268 0.11-0.22-0.33-0.44-0.55-0.66 f2, f3, f4, f5, f6 all adds 1&lt;/P&gt;&lt;P&gt;f1=0.11 f2=-0.2 f3=. f4=. f5=. f6=0.55 _ERROR_=1 _N_=5&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f2 in line 269 5-8.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f3 in line 269 9-12.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f4 in line 269 13-16.&lt;/P&gt;&lt;P&gt;269 -0.11-0.22-0.33-0.44-0.55-0.66 everything is wider by 1&lt;/P&gt;&lt;P&gt;f1=-0.1 f2=. f3=. f4=. f5=0.44 f6=-0.5 _ERROR_=1 _N_=6&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f2 in line 270 5-8.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f4 in line 270 13-16.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for f6 in line 270 21-24.&lt;/P&gt;&lt;P&gt;270 -0.11-0.220.33-0.440.55-0.66&lt;/P&gt;&lt;P&gt;f1=-0.1 f2=. f3=220 f4=. f5=0.44 f6=. _ERROR_=1 _N_=7&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.OUT has 7 observations and 6 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;Inspection of "out" shows the 3rd record is mis-interpreted as well even though there was no error messages.&amp;nbsp; Thus a mechanism to deal with these "occasionally 1 wider field" is needed.&amp;nbsp; Here's an approach, with the macro saving a tonne of repetitive typing.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;The macro, at the current column pointer, will attempt to read a variable "name" according to "fmt".&amp;nbsp; It checks the first position to see if it is a minus sign, if so, it will know it's -'ve, and input the following positions as "fmt".&amp;nbsp; If not, it will back up 1 position and read with "fmt".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; read( name, fmt );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input _byte &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: teal; font-size: 9pt;"&gt;$char1.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; @ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _byte ^= &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: purple; font-size: 9pt;"&gt;'-'&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; then input +(-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;) &amp;amp;name &amp;amp;fmt @ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;name &amp;amp;fmt @ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;name = - &amp;amp;name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop _byte;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; out1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f1, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f2, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f3, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f4, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f5, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;read&lt;/EM&gt;&lt;/STRONG&gt;( f6, &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;4.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.1 0.2 0.3 0.4 0.5 0.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.110.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 shifts by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.220.33-0.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f4 each adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f3, f4, f5, f6 all adds 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;-0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; everything is wider by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: Consolas; color: black; font-size: 9pt;"&gt;-0.11-0.220.33-0.440.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="background-color: white; color: navy; font-size: 9pt;"&gt;This code does read the input stream properly.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: white; color: navy; font-size: 9pt;"&gt;You can intersperse within your program like:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt;input &amp;lt;known fields where this won't happen for sure&amp;gt; @ ;&amp;nbsp;&amp;nbsp;&amp;nbsp; *--- must hold line&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt;@read( afrpf, 4. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt;@read(&amp;nbsp; lbpf, 4. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt;... etc etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: navy; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: arial,helvetica,sans-serif; color: navy; font-size: 9pt;"&gt;Or you might read all fields this way if they all have this possibility.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: arial,helvetica,sans-serif; color: navy; font-size: 9pt;"&gt;Hopefully this suits your needs and at least get you further along in dealing with this awkward data structure.&amp;nbsp; As other posters have said though, it really is best to fix the issue properly, although in reality, it will probably cost $$$ to re-write the instrumentation logging program and if you can deal with the data, then it won't get fixed.&amp;nbsp; Us poor buggers at the end of the chain has to suffer all of the poor design decisions made prior and clean up their messes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Daymond Ling (typo fixes)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 14:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54849#M15223</guid>
      <dc:creator>DLing</dc:creator>
      <dc:date>2011-08-30T14:28:34Z</dc:date>
    </item>
    <item>
      <title>Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54850#M15224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You are a lifesaver!&amp;nbsp; I wish there was a possibility to fix the root of the problem by fixing the data, but its just not a possibility right now.&amp;nbsp; Thank you so much for helping me out on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 15:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54850#M15224</guid>
      <dc:creator>LAtwood</dc:creator>
      <dc:date>2011-08-30T15:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data files when data is not in fixed columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54851#M15225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your input fields are all numbers then you can use data step logic to do it without macro code.&lt;/P&gt;&lt;P&gt;Create an array of the target variables and another with the expected length of each variable.&lt;/P&gt;&lt;P&gt;Then loop over the arrays keeping your own pointer into the input buffer.&amp;nbsp; You can adjust the length depending on whether the value starts with a minus sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data out;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array var f1-f6 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array len (6) _temporary_ (6*4) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; col=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; do _n_ = 1 to dim(var);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; neg=substr(_infile_,col,1)='-';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var(_n_)=input(substr(_infile_,col,len(_n_)+neg),best.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; col+len(_n_)+neg;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; drop col neg ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put (var(*)) (best6.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.1 0.2 0.3 0.4 0.5 0.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.110.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.220.330.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 shifts by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.220.33-0.440.550.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f4 each adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2, f3, f4, f5, f6 all adds 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-0.11-0.22-0.33-0.44-0.55-0.66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; everything is wider by 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-0.11-0.220.33-0.440.55-0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&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;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; 0.1&amp;nbsp;&amp;nbsp; 0.2&amp;nbsp;&amp;nbsp; 0.3&amp;nbsp;&amp;nbsp; 0.4&amp;nbsp;&amp;nbsp; 0.5&amp;nbsp;&amp;nbsp; 0.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11&amp;nbsp; 0.22&amp;nbsp; 0.33&amp;nbsp; 0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22&amp;nbsp; 0.33&amp;nbsp; 0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22&amp;nbsp; 0.33 -0.44&amp;nbsp; 0.55&amp;nbsp; 0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 0.11 -0.22 -0.33 -0.44 -0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; -0.11 -0.22 -0.33 -0.44 -0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; -0.11 -0.22&amp;nbsp; 0.33 -0.44&amp;nbsp; 0.55 -0.66&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 18:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-raw-data-files-when-data-is-not-in-fixed-columns/m-p/54851#M15225</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-08-30T18:12:01Z</dc:date>
    </item>
  </channel>
</rss>

