<?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: Ignore part of text file when importing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661702#M197741</link>
    <description>&lt;P&gt;I have not tested it, but it may be possible to simply put a DROP= or KEEP= dataset option on the output data set in PROC IMPORT. That way, the variables will still be read from the text file, but they will not be written to the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also, as suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, write your own data step code instead. After submitting PROC IMPORT, you can use a RECALL command (usually assigned to F4) in a SAS edit window to get the data step code that PROC IMPORT generated, and modify that. But as you will have to scan/read through the first 3 variables anyway to get to the stuff you want, there is probably not that much of a performance gain to this solution.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2020 11:58:11 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2020-06-17T11:58:11Z</dc:date>
    <item>
      <title>Ignore part of text file when importing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661350#M197703</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using Proc Import to import a tab-delimited text file - how would I go on about ignoring the first 3 words of the file?&lt;/P&gt;&lt;P&gt;For example if I have a text file with the information:&lt;/P&gt;&lt;P&gt;"17JUN2020&amp;nbsp; &amp;nbsp; 09:10&amp;nbsp; &amp;nbsp; &amp;nbsp;STOCKHOLM&amp;nbsp; &amp;nbsp; &amp;nbsp;lab1&amp;nbsp; &amp;nbsp; lab 2&amp;nbsp; &amp;nbsp;lab 3&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp;4"&lt;/P&gt;&lt;P&gt;then I would like to ignore the date, time and location and have lab1, lab2 and lab3 as column names with observations&lt;/P&gt;&lt;P&gt;1, 3 and 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/ Jesper&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 08:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661350#M197703</guid>
      <dc:creator>jhem</dc:creator>
      <dc:date>2020-06-17T08:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore part of text file when importing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661445#M197704</link>
      <description>&lt;P&gt;Your problem is this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;SPAN style="font-family: inherit; font-size: 16px;"&gt;When using Proc Import &lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px;"&gt;By using PROC IMPORT, you delegate thinking to the computer, and give up any control over the outcome.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px;"&gt;Write your own data step instead.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px;"&gt;How is your input file structured throughout? Do you always have the same words (lab1-lab3) in a line, followed by three values?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 09:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661445#M197704</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-17T09:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore part of text file when importing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661702#M197741</link>
      <description>&lt;P&gt;I have not tested it, but it may be possible to simply put a DROP= or KEEP= dataset option on the output data set in PROC IMPORT. That way, the variables will still be read from the text file, but they will not be written to the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also, as suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, write your own data step code instead. After submitting PROC IMPORT, you can use a RECALL command (usually assigned to F4) in a SAS edit window to get the data step code that PROC IMPORT generated, and modify that. But as you will have to scan/read through the first 3 variables anyway to get to the stuff you want, there is probably not that much of a performance gain to this solution.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 11:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661702#M197741</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-06-17T11:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore part of text file when importing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661754#M197762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/297474"&gt;@jhem&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using Proc Import to import a tab-delimited text file - how would I go on about ignoring the first 3 words of the file?&lt;/P&gt;
&lt;P&gt;For example if I have a text file with the information:&lt;/P&gt;
&lt;P&gt;"17JUN2020&amp;nbsp; &amp;nbsp; 09:10&amp;nbsp; &amp;nbsp; &amp;nbsp;STOCKHOLM&amp;nbsp; &amp;nbsp; &amp;nbsp;lab1&amp;nbsp; &amp;nbsp; lab 2&amp;nbsp; &amp;nbsp;lab 3&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp;4"&lt;/P&gt;
&lt;P&gt;then I would like to ignore the date, time and location and have lab1, lab2 and lab3 as column names with observations&lt;/P&gt;
&lt;P&gt;1, 3 and 4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/ Jesper&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Any one else here suspect that at some point in time there will be a request to look at that data as it changes over time or by location if more than one of these files exist?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 14:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignore-part-of-text-file-when-importing/m-p/661754#M197762</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-17T14:33:10Z</dc:date>
    </item>
  </channel>
</rss>

