<?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: Importing raw data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149442#M39442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the "truncover" option when you have variable length records. This will cause the last variable(s) to be filled with what's available.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 07:36:04 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-06-20T07:36:04Z</dc:date>
    <item>
      <title>Importing raw data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149441#M39441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all. I am new to SAS and am currently struggling with importing data. I am trying to import a raw data file that is set out in column format (ie no delimiters). There are 49 variables and approximately 1 million observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a copy of my code (with most variables not shown):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile 'C:\datafile';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input episode 1-12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; umrn $ 13-21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; gender 22-26&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; ..........&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; discharge_diag $ 252-501 (this is variable 29)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; pro $ 502-521&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; .........&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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; sla06 $ 1186-1194; (variable 49)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am having starts at variable number 29 which is 250 characters long, and in the vast majority of cases, is empty. When I import, for some reason when it gets to variable 29 it drops to the next observation and every variable after that (30-49) also starts on a new observation. I tried 'missover' at the end of the infile line but this just caused variable 29 - 49 to be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;P&gt;Perth Australia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 06:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149441#M39441</guid>
      <dc:creator>bat069</dc:creator>
      <dc:date>2014-06-20T06:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Importing raw data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149442#M39442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the "truncover" option when you have variable length records. This will cause the last variable(s) to be filled with what's available.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149442#M39442</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-20T07:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Importing raw data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149443#M39443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kurt,&lt;/P&gt;&lt;P&gt;Truncover has the same effect as missover...all the data from variable 29-49 just disappears.&lt;/P&gt;&lt;P&gt;Any other ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 00:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149443#M39443</guid>
      <dc:creator>bat069</dc:creator>
      <dc:date>2014-06-24T00:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Importing raw data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149444#M39444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a) could you please post an example of the input data?&lt;/P&gt;&lt;P&gt;b) could it be that you have linefeeds or CR/LF in the text data (the $250 field)? That would cause a new (short) line, and since you read with position, every variable whose pointer lies beyond the EOL is set to missing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 05:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-raw-data/m-p/149444#M39444</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-24T05:38:05Z</dc:date>
    </item>
  </channel>
</rss>

