<?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: SAS import text file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314793#M68613</link>
    <description>&lt;P&gt;When you say incomplete, do you mean truncated? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; In that case use a length statement.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2016 11:05:11 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2016-11-28T11:05:11Z</dc:date>
    <item>
      <title>SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314784#M68608</link>
      <description>&lt;P&gt;I would like to import the text file, the 2nd column should be all characters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i import, as the first record was numeric, the format was numeric and those records with alphabet became . ; may i know how to import the file that the 2nd columns should become characters instead of numeric?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can help? Sample file attached.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 10:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314784#M68608</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2016-11-28T10:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314786#M68609</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile 'have.txt' dlm=';';
input col1 $ col2 $;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Nov 2016 10:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314786#M68609</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-28T10:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314792#M68612</link>
      <description>&lt;P&gt;I tried the file with more variables...The COL5 and COL6 was incomplete after the import...Any idea? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;infile 'D:\RenewalCSV1.txt' dlm=';';&lt;BR /&gt;input col1 $ col2 $ COL3 $ COL4 $ COL5 $ COL6 $;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 11:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314792#M68612</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2016-11-28T11:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314793#M68613</link>
      <description>&lt;P&gt;When you say incomplete, do you mean truncated? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; In that case use a length statement.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 11:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314793#M68613</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2016-11-28T11:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314794#M68614</link>
      <description>&lt;P&gt;Your text file either has more than 6 cols or the data is on a single line.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If single line make make sure to use the trailing&amp;nbsp;@@.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 11:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314794#M68614</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-28T11:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS import text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314842#M68629</link>
      <description>&lt;P&gt;If you do not indicate to SAS that a character variable will exceed 8 characters that is the default length.&lt;/P&gt;
&lt;P&gt;You may want to use an INFormat statement to indicate how to read the variable.&lt;/P&gt;
&lt;P&gt;It would look something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   infile 'D:\RenewalCSV1.txt' dlm=';';
   informat Col5 Col6 $50.
   input col1 $ col2 $ COL3 $ COL4 $ COL5 $ COL6 $;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Make the size, 50 in my example, sufficient to hold the longest expected value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 15:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-import-text-file/m-p/314842#M68629</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-28T15:22:01Z</dc:date>
    </item>
  </channel>
</rss>

