<?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: Import text file into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657622#M197091</link>
    <description>It was &lt;BR /&gt;Rule:&lt;BR /&gt;—-+— etc.&lt;BR /&gt;Invalid data for ...&lt;BR /&gt;I tried to fix by infile recfm=n&lt;BR /&gt;&lt;BR /&gt;But I it does not fix. &lt;BR /&gt;I think data contain open or closed quotes and varying length width. &lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
    <pubDate>Thu, 11 Jun 2020 17:35:21 GMT</pubDate>
    <dc:creator>Emma8</dc:creator>
    <dc:date>2020-06-11T17:35:21Z</dc:date>
    <item>
      <title>Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657300#M196977</link>
      <description>Hi. I have a text file (delimiter=“~”) with about million observations and 500 variables (variables names are invalid SAS names).&lt;BR /&gt;The text file contain open and closed quotes, decimal in string. How can I import? Thank you.</description>
      <pubDate>Thu, 11 Jun 2020 08:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657300#M196977</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-06-11T08:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657313#M196979</link>
      <description>&lt;P&gt;In the data step, use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dlm="~" dsd firstobs=2 truncover&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the INFILE statement.&lt;/P&gt;
&lt;P&gt;If there is a pattern to the variable names, use a macro to reduce your code.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 08:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657313#M196979</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-11T08:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657332#M196981</link>
      <description>Thank you. &lt;BR /&gt;Does not help it though</description>
      <pubDate>Thu, 11 Jun 2020 08:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657332#M196981</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-06-11T08:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657553#M197050</link>
      <description>&lt;P&gt;"Does not help" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should as an absolute minimum show the code, or the generated code, you attempted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The options &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; apply to reading a data set with a data step. If you are attempting to use Proc Import then show us.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 14:52:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657553#M197050</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-11T14:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657576#M197065</link>
      <description>&lt;P&gt;did you try the import wizard by giving it a custom delimiter and see what code it generates. The code BallardW posted should work. Please provide your code and logs as suggested.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 15:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657576#M197065</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-06-11T15:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657622#M197091</link>
      <description>It was &lt;BR /&gt;Rule:&lt;BR /&gt;—-+— etc.&lt;BR /&gt;Invalid data for ...&lt;BR /&gt;I tried to fix by infile recfm=n&lt;BR /&gt;&lt;BR /&gt;But I it does not fix. &lt;BR /&gt;I think data contain open or closed quotes and varying length width. &lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 11 Jun 2020 17:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657622#M197091</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-06-11T17:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657629#M197097</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 01:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657629#M197097</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-06-16T01:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Import text file into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657682#M197124</link>
      <description>&lt;P&gt;Is the delimiter a comma or a tilde?&amp;nbsp; Your posted code is trying to use comma as the delimiter.&amp;nbsp; If you want to tell PROC IMPORT to use tilde as the delimiter then add this statement to the proc import step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dlm='~';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2020 21:57:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-text-file-into-SAS/m-p/657682#M197124</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-11T21:57:43Z</dc:date>
    </item>
  </channel>
</rss>

