<?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: Proc import from a flat file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-from-a-flat-file/m-p/186029#M35267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If all of the variables are present then just removing the MISSOVER option should let SAS move to the next line to find the other fields.&amp;nbsp; But if some of the records are missing some of the fields (ie there aren't enough commas) then this will cause SAS to get out of sync.&lt;/P&gt;&lt;P&gt;If the same number of fields are always on the first line then just put a / after the last field name in the first line in your INPUT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If instead the issue is that some of the fields contain embedded end-of-line characters so that records are being split then you have a bigger problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 16:46:05 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-02-27T16:46:05Z</dc:date>
    <item>
      <title>Proc import from a flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-from-a-flat-file/m-p/186028#M35266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I'm trying to import a flat file using proc iimport defining the informats and formats and input variables. But in the input file, instead of having a single line per record, two lines make a single record. this is throwing off the data alignment. As shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*","01","8","","","","","","","","","","","","","AbcRgH5172675","&amp;nbsp;&amp;nbsp;&amp;nbsp; ","1","","A","02","","01","000","p","▒ ","UK","","&lt;/P&gt;&lt;P&gt;","","N","0NNNN","0000000711","","","","","","","","","","","","","","","","","","","N","","","","","",""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is causing an issue when reading the data.there are a ttoal of 55 variables. I'm using the following procedure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data a;&lt;/P&gt;&lt;P&gt;infile '/home/usr/test_file' dlm=',' dsd MISSOVER&amp;nbsp;&amp;nbsp; lrecl=534;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat STREET_AD_1_TX $35.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat STREET_AD_2_TX&amp;nbsp;&amp;nbsp; $35.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat AD_CITY_NM $30.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat AD_STATE_CD $2.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; informat AD_ZIP_CD $9.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format&amp;nbsp; STREET_AD_1_TX $35.;&lt;/P&gt;&lt;P&gt;format STREET_AD_2_TX&amp;nbsp;&amp;nbsp; $35.;&lt;/P&gt;&lt;P&gt;format AD_CITY_NM $30.;&lt;/P&gt;&lt;P&gt; format AD_STATE_CD $2.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format AD_ZIP_CD $9.;&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt; STREET_AD_1_TX $&lt;/P&gt;&lt;P&gt;STREET_AD_2_TX&amp;nbsp; $&lt;/P&gt;&lt;P&gt;AD_CITY_NM $&lt;/P&gt;&lt;P&gt; AD_STATE_CD $&lt;/P&gt;&lt;P&gt; AD_ZIP_CD $&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 16:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-from-a-flat-file/m-p/186028#M35266</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2015-02-27T16:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import from a flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-from-a-flat-file/m-p/186029#M35267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If all of the variables are present then just removing the MISSOVER option should let SAS move to the next line to find the other fields.&amp;nbsp; But if some of the records are missing some of the fields (ie there aren't enough commas) then this will cause SAS to get out of sync.&lt;/P&gt;&lt;P&gt;If the same number of fields are always on the first line then just put a / after the last field name in the first line in your INPUT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If instead the issue is that some of the fields contain embedded end-of-line characters so that records are being split then you have a bigger problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 16:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-from-a-flat-file/m-p/186029#M35267</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-02-27T16:46:05Z</dc:date>
    </item>
  </channel>
</rss>

