<?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 importing dat file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231384#M42082</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;how can I import a dat file into sas and create a text file output? I am new to sas. Thanks!&lt;/P&gt;
&lt;P&gt;The dat file contain numeric values.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Oct 2015 16:24:44 GMT</pubDate>
    <dc:creator>jflo36</dc:creator>
    <dc:date>2015-10-23T16:24:44Z</dc:date>
    <item>
      <title>importing dat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231384#M42082</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;how can I import a dat file into sas and create a text file output? I am new to sas. Thanks!&lt;/P&gt;
&lt;P&gt;The dat file contain numeric values.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 16:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231384#M42082</guid>
      <dc:creator>jflo36</dc:creator>
      <dc:date>2015-10-23T16:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: importing dat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231397#M42083</link>
      <description>&lt;P&gt;.dat files are not really unique as far as SAS is concerned but your data structure will determine how easy it is to read in through a data step. &lt;A title="SAS Doc" href="http://support.sas.com/kb/33/486.html" target="_blank"&gt;Here&lt;/A&gt; are some resources with examples of importing .dat files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for exporting, you will have to decide what kind of delimiter you want for the file. For example, if you want to just have space delimited output, you can write the file with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data _null_ ;
    set have ; 
    FILE  'C:\want.txt' ; 
    PUT v1 v2 v3 ; 
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can specify the DLM option on the file statement for other delimiters on the output file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a side note, are you doing something else to the data? I.e., some kind of processing before writing it out? I would imagine so, but if you're purely wanting to turn a .dat file into a .txt file, you can just change the extension.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 17:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231397#M42083</guid>
      <dc:creator>JoshB</dc:creator>
      <dc:date>2015-10-23T17:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: importing dat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231418#M42085</link>
      <description>&lt;P&gt;Thanks very much JoshB!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 17:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231418#M42085</guid>
      <dc:creator>jflo36</dc:creator>
      <dc:date>2015-10-23T17:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: importing dat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231471#M42094</link>
      <description>&lt;P&gt;Unlike something like ".xlsx" the suffix ".dat" doesn't really tell you&amp;nbsp;which application created the file and in what format the data is stored in this file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes ".dat" files are simply text files. Can you open it with a text editor and then see the data directly? Or do you know which application created this ".dat" file?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2015 01:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/importing-dat-file/m-p/231471#M42094</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-24T01:05:27Z</dc:date>
    </item>
  </channel>
</rss>

